Proposal: opt-out local scoping

P T Withington ptw at pobox.com
Thu Aug 28 05:37:26 PDT 2008


On 2008-08-28, at 07:52EDT, Dave Herman wrote:

> Lexical scope is in the air.  :)  Please take a look at the lexical
> scope proposal on the wiki and offer any comments or suggestions:
>
>     http://wiki.ecmascript.org/doku.php?id=strawman:lexical_scope
>
> Essentially, the above is a less radical proposal that simply uses the
> lexical scope that's already there in JavaScript, but as you suggest
> enforces it with a pragma. The result is a language where free
> variables, both in assignments and references, are a statically
> detectable error, but with otherwise essentially the same semantics  
> that
> JavaScript already has.

I like this, but wouldn't you want to provide escapes, like "reformed  
with" and/or a way to declare an individual reference to be free?


More information about the Es-discuss mailing list