2013/7/30 David Bruant <bruan...@gmail.com>

> 2013/7/30 Tom Van Cutsem <tomvc...@gmail.com>
>
>> tl;dr:
>>
>> I would argue that Array.isArray should return true for
>> proxies-for-arrays.
>> The other built-ins are less crucial and could stay the way they are.
>>
> What about WeakMaps? Maps? Sets?
>

I meant the specific list of built-in methods on Array, apart from isArray,
are less crucial.

We'll have to evaluate the other types you mention on a case-by-case basis
as well.


> How is the line drawn between "crucial" and "less crucial"? How is going
> to be decided whether new exotic object types are crucial?
> I feel the line is very context-specific.
>

I think that's essentially Allen's point: with built-ins, you arrive at
rock-bottom, at the edges of the platform. You cannot easily generalize
anymore. We need to look at each of these "is an exotic X" tests on a
case-by-case basis and use our judgment whether it makes sense for proxies
to pass the test.


> I can easily agree that arrays are more used than other exotic objects
> *for now* (WeakMap/Map/Set may change that, we'll see), but a Date
> enhancing library will want to work with proxies (proxies it does not have
> necessarily created), and it will become crucial for proxies-on-dates to
> work there.
> Importance is relative to context and doing a "common denominator"
> analysis to assess importance can be detrimental for specific use cases.
>
>
> "I agree that it is not safe to generalize: a proxy for an X is not in
> general substitutable for X."
> => How much unsafe? What are the risks?
>

I don't think a general answer exists, because each of these built-ins has
its own idiosyncratic set of invariants.

Cheers,
Tom
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to