Scoped variables

Jonathan Brachthäuser jonathan.brachthaeuser at
Sun Dec 9 10:47:04 UTC 2018

Regarding the semantics of scoped variables: There is a paper by Oleg Kiselyov et al. describing the combination of delimited control (delimited continuations) and dynamic binding:

Since fibers are close to delimited continuations and (from what I understand) scoped variables are similar to dynamic binding, this might be relevant.
Maybe you are already aware of the paper, but I thought I mention it nevertheless.



> On 9. Dec 2018, at 11:39, Andrew Haley <aph at> wrote:
> On 12/8/18 9:26 AM, Andrew Haley wrote:
>>> There are some good reasons for making these variables look like
>>> constants.  So here's a possibly crazy idea:  What if the names of
>>> scoped variables looked more like the enum constants in a Java enum
>>> type: constant singleton instances associated with a class by name.
>> Sure, why not? That would make things even simpler.
> Thinking about this some more, it does sound attractive. After all, all
> we need at runtime is a key to look up a local binding. And making it
> something like a constant emphasizes (enforces?) the intended usage
> pattern.
> -- 
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the loom-dev mailing list