Scope Locals
John Rose
john.r.rose at oracle.com
Tue Apr 6 00:40:11 UTC 2021
On Apr 3, 2021, at 7:32 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
> When I worked on related features in the past, I found myself stumbling around for the lack of a precise term for "all the code X for which the current call frame is on X's stack", but this is the concept you're describing. (In the context of Loom, this would also include all continuations that could indirectly return to this call frame.) Bonus points for coming up with a good term for this.
In Lisp we use the term “dynamic scoping” to describe how a
“special var” is visible to frames below one of its bindings.
So “dynamic scope” seems to be a good term for those chunks
of code, just as “static scope” describes a different, narrower
set of code chunks.
Dynamic scope is a relation between dynamically created
stack frames (and other ranges), as opposed to static or
lexical scope which relates statically designated blocks
(in code).
As in: “Within the dynamic scope of this call, the scoped
variable FOO identifies the current transaction ID.”
More information about the loom-dev
mailing list