2012/10/10 Brendan Eich <bren...@mozilla.org> > Tom Van Cutsem wrote: > >> We should also be wary of adding even more Proxy constructors, as we'll >> otherwise end up with a combinatorial explosion (revocable branded proxies, >> branded proxies with a symbol whitelist, etc.) >> > > But didn't David find a way to avoid Proxy.revocable, namely make > revocation swap in an all-throwing-traps handler? > Unfortunately no. I agree with Tom concern of combinatorial explosion, because we will have revocable, branded, and what's next? However, the symbol whitelist isn't part of it. The whitelist doesn't make a new type of proxies.
> Just trying to keep up here (and hoping we indeed avoided a revocable > proxy constructor). > Even with the idea of native support for membrane as I presented it, it doesn't change that anyone holding a reference to a proxy indirectly keeps a reference to the target, thus causing the GC to not be able to collect the target. We need platform support for revocation, because it cannot be implemented by JS code. All in all, membranes can be implemented today. I find the idea of using dummy targets a bit awkward, but it works. If after some experience using proxies, the cost turns out to be prohibited, There is still room for improving proxies with what proposed or whatever else in a later version of the spec I think. The issue I'm pointing is not as urgent as the revocation issue was. David
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss