December 2021
Beginner
840 pages
47h 29m
English
Static scoping means that the declaration to which a reference is bound can be determined before run-time (i.e., statically) by examining the text of the program. Static scoping was introduced in ALGOL 60 and has been widely adopted by most programming languages. The most common instance of static scoping is lexical scoping, in which the scope of variable declaration is based on the program’s lexical layout. Lexical scoping and static scoping are not synonymous (Table 6.2). Examining the lexical layout of a program is one way to determine the scope of a declaration before run-time, but other strategies are also possible. In lexically scoped languages, the scope of a variable reference is the code constituting its static ancestors. ...