Direct proxies strawman

Andreas Rossberg rossberg at
Tue Oct 18 08:16:54 PDT 2011

On 17 October 2011 21:15, Tom Van Cutsem < at> wrote:
> I just finished a first draft of the
> strawman: <>.
> Feedback welcome.

Hi Tom,

this looks nice, but a couple of things confuse me.

First, Proxy.startTrapping (a.k.a. Proxy.attach). As far as I can see,
this implies a significantly more general 'become' operation than the
current semantics. I don't see how we can implement that without
substantial (and potentially costly) changes to VMs, like support for
transparent forwarding references. I also share Dave's concerns
regarding conflation of "non-attachability" and "non-extensibility".

Proxy.stopTrapping worries me, too, especially in combination with
attaching. It seems like I could create a proxy p, then later want to
deactivate trapping for my handler. But in the meantime, somebody else
morphed my p into his own proxy by invoking startTrapping(p). So
stopTrapping(p) would deactivate his handler, not mine. So, the
proposed interface seems broken to me.

Finally, I'm not sure I fully understand the performance implications
of direct proxies vs the current proposal. From looking at your
prototype implementation, it seems that we need quite a number of
additional checks and calls, even for non-fixed properties. Can you
perhaps quantify that overhead a bit?


More information about the es-discuss mailing list