[[Invoke]] and implicit method calls, once more

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Oct 18 11:24:48 PDT 2013


On Oct 18, 2013, at 11:06 AM, Brandon Benvie wrote:

> On 10/18/2013 11:01 AM, Allen Wirfs-Brock wrote:
>> What your question does help me be more decisive on: We should not be in a rush to add an Invoke, InvokeFunction, or any new traps not needed for membranes, and not subject to a long history of examination. Invoke at least, as a derived trap, can always be added later, after ES6.
> 
> Isn't there observably different behavior different depending on whether invoke exists or not? Even if you don't implement it in your handler? If that's the case, then it's not guaranteed that it can be added later down the line.

Yes, and those differences are not easily fixable in the context of the current Proxy design.  As currently defined, some possible uses of Proxies will be "broken" regardless of whether or not [[Invoke]] is there.   Yet, the only reason to add [[Invoke]] at this time would be to try to fix issues with Proxies but even with [[Invoke]] we still have issues.  And. for ES6, we're run of time for experimenting with fixes.  However, as Mark pointed out, experts can make them work for specific use cases and they are essential for supporting membranes. So we can live with the exiting design (without [[Invoke]]) as an expert feature for building membranes and similar use cases.

If we ever come up with a better design (perhaps including [[Invoke]]) we can always introduce a new kind of proxy that works with it.

Allen


More information about the es-discuss mailing list