2013/9/11 Brendan Eich <[email protected]>

> 3) For proxy trap invocations I maintain we are still better off with
>> [[Get]] + [[Call]] to keep double-lifting as simple as possible.
>>
>
> Sorry if I missed it: what complicates things if we use [[Invoke]] to
> support double-lifting?


Trap method calls on the handler are conditional: if the handler doesn't
implement a trap, the proxy will forward to the target instead.

Currently we call handler.[[Get]] + verify whether the result is
callable. In the case of double-lifting, this means the meta-handler only
has to implement the "get" trap.

If we would have a hypothetical [[ConditionalInvoke]] with corresponding
trap, then the meta-handler would just implement that trap instead. This
would work.

Any other solution that uses 2 methods (e.g. [[Has]]+[[Invoke]],
[[Get]]+[[Invoke]], [[Get]]+[[InvokeFunction]]) will require the
meta-handler to implement 2 traps. Again, this is not fatal, but it does
make the pattern uglier.

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

Reply via email to