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

> Brandon Benvie <mailto:[email protected]>
>> 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.

Experimentation should be easy enough: this is all library code, easily
self-hosted. Here's my prototype implementation on GitHub: <
https://github.com/tvcutsem/harmony-reflect/blob/master/handlers.js>.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to