Assigning to globals in strict mode

Dmitry A. Soshnikov dmitry.soshnikov at gmail.com
Mon Oct 18 10:38:20 PDT 2010


  On 18.10.2010 21:13, Jeff Walden wrote:
> On 10/18/2010 10:09 AM, Oliver Hunt wrote:
>> Am I missing something important?  Does delete fail for all 
>> properties on the global object in strict mode?
>>
>> Or does the behaviour of put in strict mode result in new properties 
>> on the global object always being configurable = false?
>
> 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.

Dmitry.

> Jeff
> _______________________________________________
> es5-discuss mailing list
> es5-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es5-discuss



More information about the es5-discuss mailing list