Chapter 3 - Names, Scopes, and Bindings

Origins of high level languages

Origins of high level languages

Origins of high level languages

Origins of high level languages

So what is a name?

So what is a name?

3.1 The notions of binding and binding time

3.1 Possible binding times

3.1 Possible binding times

3.1 Binding time

3.2.1 Object life and storage management

3.2.1 Object life and storage management

3.2.1 Object life and storage management

3.2.2 Stack-based allocation

3.2.2 Stack-based allocation

3.2.2 Stack-based allocation

3.2.2 Stack-based allocation

3.2.3 Heap-based allocation

3.2.3 Heap-based allocation

3.2.4 Garbage collection

3.2.4 Garbage collection

3.3.1 Scope rules: Static scoping

3.3.1 Scope rules: Static scoping

3.3.3 Declaration order

3.3.3 Declaration order

3.3.3 Declaration order

3.3.3 Declaration order

3.3.3 Declaration order

3.3.4 Modules

3.3.4 Modules: closed and open scope

3.3.5 Module types and classes

3.3.5 Module types and classes

3.3.6 Dynamic scoping

3.4 Implementing scope

3.5 The meaning of names within a scope

3.5 The meaning of names within a scope

3.6 Binding of referencing environments

Closures

3.6.2 First-class values and unlimited extent

3.6.2 First-class values and unlimited extent

3.7 Macro expansion

#define emit(a)  printf("%d",a)
emit(3); ==> printf("%d",3);