2016-03-19 0:15 GMT+01:00 Michael Theriot <[email protected]>:

> To be clear, I'm not suggesting behavior like `getOwnPropertyNames` be
> overridden by anything on the prototype, just a way to use proxies without
> having to instantiate identical copies that all use the same handler.
>

If you can already reuse the same handler object between multiple proxies,
you're in good shape. There should be very little overhead in creating many
proxy objects that share the same handler. A proxy object is just an empty
object with a hidden reference to its handler.

Besides, if you want to reliably proxy multiple objects, you must
instantiate a proxy per object anyway, otherwise you may get in trouble
with object-identity. A single proxy object that proxies many different
target objects would have only 1 object identity, so all the proxied
targets would appear to be identity-equal.

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

Reply via email to