Hacker News new | ask | show | jobs
by kazinator 1714 days 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, which C renamed to "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)

1 comments

I agree. Thank you.