Topic: binding of names to objects
Topic: data type by access rights
Topic: global declarations and variables
Topic: local declaration of data
Topic: names defined by context
Topic: object-defined names
Topic: program module as encapsulation
| |
Summary
The scope of a declaration is the region visible to the declaration. (cbb 7/06)
Usually a declaration is local to the enclosing block and global to interior blocks, but a number of alternatives are possible. In cluster oriented languages, data objects may be explicitly exported or imported. In Qlisp, patterns can be defined open/semiopen/closed; while in Smalltalk, variables may be activation temporaries, instance identifying variables, or class variables shared by all objects. (cbb 5/80)
Subtopic: scope
Quote: an identifier is a symbol or name for a variable, type, procedure, etc. within the scope of its declaration
| Subtopic: static vs. dynamic
Quote: scope is static if procedure called in definition environment while dynamic if called in caller's environment [»maclBJ_1987]
| Quote: the 'dynamic' namespace contains the calling agent and whatever is explicitly added [»acheF9_2000]
| Quote: Piccola uses its dynamic namespace to implement exception handling [»acheF9_2000]
| Quote: implement dynamic variables via set and use statements that allocate from the stack; 'use' searches the 'set' variables for a match [»hansDR6_2001]
| Subtopic: problems with dynamic scope
Quote: equivocation is using the same word in different ways in the same conversation; reflects difficulty of dynamic scoping [»maclBJ_1987]
| Subtopic: spatial metaphor
Quote: computational scoping matches concept of inside in spatial metaphor [»diseAA9_1986]
| Quote: spatial metaphor implies hierarchical structures due to box containment [»diseAA9_1986]
| Subtopic: literals
Quote: symbols that are valid handles to objects in most scopes are typically recognized syntactically, e.g., numbers, symbols, and strings [»kentW6_1991]
| Subtopic: export
Quote: a block may grant (export) access rights of local variables to other blocks [»mcgrJR1_1979]
| Subtopic: class definition
Quote: a class definition defines names for temporaries, instance variables, and class variables [»goldA3_1976]
| Quote: Smalltalk accessed class variables and methods through the instance variable of the class' metaobject [»batesR11_2004]
| Subtopic: record as local scope
Quote: a record in Pascal defines a local naming scope which is opened with the dot operator [»maclBJ_1987]
| Subtopic: arguments
Quote: the scope of a keyword parameter is its argument expression and its procedure [»parkR7_1978]
| Quote: when invoking a procedure, one can 'see' the argument's inner block [»parkR7_1978]
| QuoteRef: simscrip_1971 ;;156 before "every" declarations goes switch to tell what class eg Permanent Entities
|
Related Topics
Topic: binding of names to objects (19 items)
Topic: data type by access rights (20 items)
Topic: global declarations and variables (33 items)
Topic: local declaration of data (11 items)
Topic: names defined by context (36 items)
Topic: object-defined names (15 items)
Topic: program module as encapsulation (28 items)
|