Assigning to globals in strict mode

Brendan Eich brendan at mozilla.org
Tue Oct 19 17:36:43 PDT 2010


On Oct 19, 2010, at 4:22 PM, Oliver Hunt wrote:

> On Oct 19, 2010, at 4:19 PM, Maciej Stachowiak wrote:
> 
>> If Harmony is going to require the other behavior, how about an erratum to make ES5 strict mode the same? There doesn't seem to be much reason to have a future behavior difference here.
> 
> In harmony you have a purely lexical scope, eg. the global object is not at the head of the scope chain.  That means all unqualified names can be resolved statically so all these errors become early errors.
> 
> In ES5 there is both with() and the global object that make early errors incompatible.

Exactly. (BTW, do people use "head" for the far end of the scope chain? I try to be consistent in using "tail", myself... ;-)

Plus, ES5 is "done". Sure, there are errata and will be more. But too many errata, especially "big" ones (even if "small" in spec language terms; I mean by "big" that they have significant implications for implementors and possibly for other parts of the spec, without enough time to study the big picture), seem likely to cause trouble.

/be




More information about the es5-discuss mailing list