subscopes
Subscopes are nested scopes within a larger lexical or dynamic scope in many programming languages. A scope is a region of program text in which bindings of names—such as variables and functions—are visible to the compiler or interpreter. Subscopes arise when a construct introduces a new, smaller region of declaration visibility inside an enclosing scope, for example within a block, a function, or a class body.
In languages with lexical scoping, each scope typically has its own symbol table. When the program resolves
Examples across languages vary. C and C++ create subscope blocks inside a function when braces delimit a
Subscopes support modularity and encapsulation by limiting the lifetime and visibility of bindings, enable controlled name
See also: scope, lexical scope, static scope, symbol table, name resolution, nested scope.