Perhaps @@unscopable shouldn't be a Set...
Axel Rauschmayer
axel at rauschma.de
Wed Apr 30 10:14:14 PDT 2014
> 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:
* Hard-coding `with` to ignore only Array.prototype.values.
* Patching the problematic libraries somehow.
* Use a property attribute to signal to `with` that a property should be ignored. [[Enumerable]] would be perfect, but unfortunately won’t work.
Somehow, we have to put the burden on `with` and the legacy code instead of the future-facing parts of the language.
Axel
--
Dr. Axel Rauschmayer
axel at rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
More information about the es-discuss
mailing list