Proposal: opt-out local scoping

P T Withington ptw at pobox.com
Thu Aug 28 06:22:41 PDT 2008


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

> As for free references, what can you do with a free variable? If you  
> mean you want a way to look something up in the global object, then  
> use `this.id' or `this[expr]' (or `let global = this' followed by  
> global.id/global[expr]).
>
> It might be nice to have a standard library (called `global' or  
> something) that's bound to the global object so you can have a less  
> fragile binding to the global object than `this'.

Exactly.  I think it would be worthwhile to have a standard way to  
refer to the global object.


More information about the Es-discuss mailing list