Module isolation

Kevin Curtis kevinc1846 at googlemail.com
Wed Jan 13 01:51:32 PST 2010


The lexical_scope strawman looks very good.

So, it's possible that:
eval.hermetic =
"use strict"
+ "use lexical scope" (which maybe subsumed by "use strict")
+  top-level 'this' set to something which isn't the global object. Or
removed (for eval.hermetic).

Maybe eval.hermetic could 'pioneer' taking global off the scope chain via an
implicit "use lexical scope" (plus "use strict"). If eval.hermetic takes as
a second parameter a 'global' object it could be used to configure the
top-level lexical frame - whose bindings are implicity frozen. If no
'global' object is passed - then standard environment primordials are
assumed (which may be frozen or at least sandboxed).

(For some reason i thought the lexical_scope proposal was about turning
'vars' into 'lets'. doh).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20100113/dfc8ba8f/attachment.html>


More information about the es-discuss mailing list