[[Invoke]] and implicit method calls

Tom Van Cutsem tomvc.be at gmail.com
Wed Sep 25 01:58:33 PDT 2013

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 <

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.

Experimentation should be easy enough: this is all library code, easily
self-hosted. Here's my prototype implementation on GitHub: <
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130925/fc2fb82c/attachment.html>

More information about the es-discuss mailing list