Scoped variables

Andrew Haley aph at
Sun Dec 9 10:39:21 UTC 2018

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

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