Assigning to globals in strict mode

Jeff Walden jwalden+es at MIT.EDU
Mon Oct 18 11:12:05 PDT 2010

On 10/18/2010 10:38 AM, Dmitry A. Soshnikov wrote:
>> This doesn't have anything to do with configurability, I think -- you don't get far enough to know the binding is mutable. It's simply that delete throws when provided an unqualified name (identifier), because such a name always evaluates to a Reference with an environment record as its base.
> Hm... a good catch. Which I think is an err of the spec. I think that step 5 of the 11.4.1 was provided to mean exactly _variables_ (function declarations, args). I.e. do catch the case of trying to delete non-configurable thing. However, this 11.4.1 step 5 wrongly (?) grabs configurable properties which can be deleted. Thus, of course it occurs before we get analysis of the configurable attribute. Possibly a small errata is needed.

My impression, from the occasional gleanings here I got (too busy to follow the list in detail), was that deleting was not supposed to catch only exactly variables and argument names, but maybe I'm mistaken about that.  I'd thought the step was written to be a near-compile-time decision: if it's deleting a raw name and it's in strict mode, it is a TypeError if it is reached.


More information about the es5-discuss mailing list