2014-11-12 23:49 GMT+01:00 Andrea Giammarchi <[email protected]>:

> If Array.isArray should fail for non "pure" Arrays, can we have a
> Proxy.isProxy that never fails with proxies ?
>

We ruled out `Proxy.isProxy` very early on in the design. It's antithetical
to the desire of keeping proxies transparent. In general, we want to
discourage type checks like you just wrote.

If you're getting handed an object you don't trust and need very strong
guarantees on its behavior, you'll need to make a copy. This is true
regardless of proxies. In your example, even if the array is genuine, there
may be some pointer alias to the array that can change the array at a later
time.

Regards,
Tom
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to