[[Extensible]]and Proxies (Was: Proxy.isProxy )
brendan at mozilla.com
Thu Jul 14 15:16:50 PDT 2011
On Jul 14, 2011, at 3:00 PM, Allen Wirfs-Brock wrote:
>> Host objects are part of the platform. A platform provider is free to violate any part of the spec they like, and there's nothing we can do about it other than to add tests to std test suites to make the violations obvious to the community.
> We could provide a defined interface mechanism that validates constraints or limits behavior in a way that guarantees the desired invariants. That's what Proxies appear to be trying to do, why not do it for host objects. If you can depend upon host objects actually supporting your invariants why does not matter whether or not Proxy objects also do so.
For the record, Mozilla wants its "host objects" to be only as powerful as Proxies. Current web compatibility constraints don't allow this but we want to evolve the standards, de facto (over time) and de jure, toward that goal.
Some Proxy extensions may be needed, too, so it's not all up to web compatibility to take the hit.
Here, I do not think we should keep treating host objects or the "platform provider" as priviileged by ECMA-262 to do whatever the heck they want. The spec gives host objects way more rope, as you point out (lots of lack of specification, and somewhat inconsistent and sparse attempts to constrain host object semantics). That's a historic botch due mostly to the IE DOM.
>> * The "eternal invariants" from <https://mail.mozilla.org/pipermail/es-discuss/2011-May/014150.html>.
> We can certainly discuss these, but TC39 hasn't adopted them.
We should discuss. Agree we have not adequately discussed, let alone adopted.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss