Is the mutability of bindings in strict eval code observable in the language?

Brendan Eich brendan at mozilla.org
Mon Oct 18 11:10:44 PDT 2010


On Oct 18, 2010, at 10:26 AM, Jeff Walden wrote:

> Per the delightfully mind-twisting behaviors referred to in the "Assigning to globals in strict mode" thread, |delete foo| throws in strict mode.  That's the only way I can think of (if such a delete worked) that such bindings being mutable could be observed.

You mean configurable, in ES5 terms, by mutable, right?


>  And since eval code gets its own Lexical Environment, the bindings aren't observable in any code that isn't strict mode.  Is there another way?  Flipping such bindings to be non-configurable would be a nice simplicity win in SpiderMonkey, if it's doable without violating the spec.

Sounds doable, this was also intentional, IIRC. We really want those strict-eval var bindings not to appear to be properties on any object (so delete does not compute).

/be



More information about the es5-discuss mailing list