[[Invoke]] and implicit method calls

Till Schneidereit till at tillschneidereit.net
Wed Sep 25 05:18:05 PDT 2013


On Wed, Sep 25, 2013 at 10:58 AM, Tom Van Cutsem <tomvc.be at gmail.com> wrote:

> 2013/9/24 Brendan Eich <brendan at mozilla.com>
>
>>  Brandon Benvie <mailto:bbenvie at mozilla.com>
>>> September 24, 2013 11:44 AM
>>>
>>> It seems unfortunate that we have to rely on a membrane for something as
>>> simply as `new Proxy(new Date, {}).getDate()` to work. [[Invoke]] as
>>> currently specced gets us somewhere at least.
>>>
>>
>> Somewhere half-right and half-wrong, depending on target object details
>> over which a single trap cannot hope to abstract, is still half-wrong.
>> Membranes based on built-in libraries should be easy enough to use.
>>
>> That does mean we have to get the built-in libraries right. Something
>> best done on github (see promises), but then potentially absorbed by the
>> spec in short order (whichever spec is in the right rapid-er release stage
>> to absorb the library).
>>
>> Tom, are you happy with the state of the proxy-supporting libraries for
>> ES6?
>>
>
> I presume by proxy-supporting libraries, you primarily mean the Handler
> hierarchy at <
> http://wiki.ecmascript.org/doku.php?id=harmony:virtual_object_api>.
>
> I have mixed feelings. It's all technically sound w.r.t. the spec, but I
> have the feeling the proposed handlers are still too generic because they
> are not driven by concrete use cases.
>
> This is a part of the Proxy API that we could consider postponing beyond
> ES6, encouraging the community to come up with their own abstractions.
>

Note that .invoke is not in that part, though: once proxies ship (in more
than one browser) with all method calls invoking the .get handler, that
ship has sailed. Suddenly not invoking the .get handler, anymore, will
break applications.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130925/ed6a9950/attachment.html>


More information about the es-discuss mailing list