Allen Wirfs-Brock wrote:
All good except it's impossible/not meant to recognize Proxies in JS
world?
Note that Tom said: "recognize /their/ proxies" (emphasis added). If
it needs to, a membrane or any other proxy issuing subsystem should be
able to recognize its own proxies. It can, for example, tag them
using a private symbol or keep them in a weak map. You don't want to
recognize other subsystems proxies as proxies. They're just objects
to you.
Critical point -- same as if we ignore proxies and have two separate
systems whose objects must satisfy certain constraints that are internal
to each system. Yes, APIs for these systems should be more structurally
typed, IMHO -- but sometimes you need high integrity and performance. In
such cases, what amounts to nominal types or brands come into play.
There may be no universal domain of discourse for objects in a given
super-system.
Wishing the DOM were entirely self-hosted and "open-box" is just not
realistic. As Boris points out, CSS selector matching must not trigger
traps or getters, and must be parallelizable.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss