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

Rick Waldron waldron.rick at
Wed Apr 30 10:22:56 PDT 2014

On Wed, Apr 30, 2014 at 1:14 PM, Axel Rauschmayer <axel at> wrote:

> > 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.
> I never liked it. It burdens the language in order to support legacy code.
> Are there other ways of fixing the problem?
> A few, probably silly, ideas, for the sake of brainstorming:

Here's the conversation, everything in your list was discussed:

> * Hard-coding `with` to ignore only Array.prototype.values.

@@unscopables is this, but not limited to Array.prototype.values

> * Patching the problematic libraries somehow.

This is not reasonably feasible when the libraries are being used in
enterprise applications and are done so under contract/license (as in the
case of Ext.js)

> * Use a property attribute to signal to `with` that a property should be
> ignored. [[Enumerable]] would be perfect, but unfortunately won’t work.

Andreas suggested this originally, but the additional state bit on every
object is undesirable.

> Somehow, we have to put the burden on `with` and the legacy code instead
> of the future-facing parts of the language.

That's what @@unscopables does.

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

More information about the es-discuss mailing list