Scoped variables

Peter Fraenkel pnf at podsnap.com
Fri Jul 19 20:51:54 UTC 2019


>  In particular, is the idea of a binding with a dynamic scope that reverts to the old value when we exit the scope a better one than the existing un-scoped lifetime of ThreadLocals, whose value persists until the next time it is set?


Yes, much better, I think.   The most useful and least confusing semantics would be stack-like, where a scope-local “global” would be essentially equivalent to passing an additional argument through every method call.  


More information about the loom-dev mailing list