Files
carbon-lang/docs/spec/lang/names.md
T
Richard Smith 48d5b18026 Initial rough framework for specification. (#140)
Provide an initial rough structure for the specification so we can add things
as they are decided.

Split the specification into a language and a library section. In the language
section, use one file per broad area of functionality. Divide the language up
based on the intended layering of the language design.
2022-03-16 15:43:09 -07:00

35 lines
871 B
Markdown

# Names
<!--
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-->
TODO
## Names
1. A _name_ is an [identifier](lex.md). Two names are the same if they comprise
the same sequence of Unicode code points.
TODO: Normalization?
## Scopes
1. A _scope_ is one of:
- The top level in a source file.
- A pattern scope.
- A block scope.
- A type definition.
2. Every construct that declares a name _binds_ the name to the declared entity
within the innermost enclosing scope.
## Unqualified name lookup
1. Unqualified name lookup associates a name with an entity. The associated
entity is the entity to which the name is bound in the innermost enclosing
scope in which the name is bound.