On Wed, Apr 30, 2014 at 1:14 PM, Axel Rauschmayer <a...@rauschma.de> 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:
https://github.com/rwaldron/tc39-notes/blob/master/es6/2013-07/july-23.md#43-arrayprototypevalues


>
> * 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.

Rick
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to