* naming-general ** parameter-passing ** scope * Naming (Schmidt 7.1) ** Basic needs *** primitive set of names, way to combine them *** abstraction: abbreviation of long names ** Environment: Identifier -> (Denotable-value + Unbound) *** gives meaning to identifiers *** relationship between denotable and expressible values *** Changes to FL semantics (for this discussion) ** Parameter Passing (Schmidt 8.2) *** changes to domain equations for Naming from FL semantics **** Clause for (proc I E) injects into Value **** what happens to the other clauses? *** Pass by value (i.e., call by value): *** Pass by name (closure): *** Pass by denotation *** quiz ** Scope Rules *** basic defintions **** binding constructs introduce defintion (decl) for name or set of names **** scope of declaration is area of program text **** static (lexical): can determine scopes before running program **** dynamic: in general, scope (at each instant) determined at run-time ***** funarg problem *** Non-hierarchical scope **** Hierarchical scope: strict (static) nesting of scopes ***** problem: information hiding, e.g., ADTs for stacks ***** problem: managing the namespace (too many globals) **** Solution: values with named subparts: modules or records **** Imports *** Multiple namespaces