3 ms·
The Lisp term "dynamic" means "stack-like LIFO discipline". "Dynamic scope" is a shorthand that refers to "indefinite scope with dynamic extent", where "dynamic
by kazinator 5y ago
The Lisp term "dynamic" means "stack-like LIFO discipline".
"Dynamic scope" is a shorthand that refers to "indefinite scope with dynamic extent", where "dynamic extent" refers to the bindings being tied to stack-like frames, such that they are torn down then constructs terminate.
When we "declare dynamic-extent" an object, the compiler may stack-allocate it.
The C language redefined "dynamic" from "stack" to "heap". If you look into the BCPL manual (one predecessor language that inspired Ken Thompson's B), it uses "dynamic extent" to refer to the stack, what C renamed "automatic storage":
"[T]he extent of a dynamic data item starts when its declaration is executed and continues until execution leaves the scope of the declaration." (1967 BCPL Manual, 7.2)
- kragen 5y agoI agree. Thank you.