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

Allen Wirfs-Brock allen at
Wed Sep 25 13:07:59 PDT 2013

At last weeks TC39 meeting we had consensus that the value of the @@unscopable property should be a Set 

As I begin to look at implementing this (and the other @@unscopable changes from the meeting) I'm not so sure that Set is such a good idea.  My basic concern is that @@unscopable operates at a very low level of the ES name binding resolution mechanism.  Set exists at a much higher conceptual level of the ES library and (until now) there was nothing in the fundamental language semantics of ES that depends upon the existence of a library Set object. Now that I have thought about this,  it seems fundamentally wrong to unnecessarily create such an up-dependency.

I think we will have a cleaner semantics if we continue to treat an @@unscopable value as an array-like object for the purpose of accessing its property blacklist. Implementations, if they wish, can us2 caching scheme to obtain sub-linear time access to an @@unscopable blacklist.

In light of this consideration, does anybody still want to argue that we should require an @@unscopable value to be a Set instance?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list