Perhaps @@unscopable shouldn't be a Set...

Allen Wirfs-Brock allen at
Wed Sep 25 15:17:29 PDT 2013

So here is another concern, about the scheme we agreed to last week.

It needs to match a found own property against the possibility of an own @@unscopable property on the same object and that  object may be somewhere up the inheritance chain of the actual with object.  The means that [[HasProperty]]/[[Get]]/[[Set]] can not be used to do those resolve binding in an ObjectEnvironmentRecord because they don't tell us where the property was found.  Instead, ObjectEnvironmentRecord needs to reimplement its own property lookup using [[GetOwnProperty]] and [[GetInheritanceOf]].  However, if the with object is a proxy that means we may be bypassing the actual inheritance mechanism implemented by the Proxy's 'has'/'get'/'set' traps and that could introduce observable semantics irregularities. 

Specifying the duplicated lookup is doable but a pain.  That and the semantic issues WRT proxies makes me a lot less comfortable with the added complexity of supporting @@unscopable.


More information about the es-discuss mailing list