proxies v2 proposal

Tom Van Cutsem tomvc at google.com
Tue Dec 22 14:41:46 PST 2009


Hi,

We wrapped up our second iteration over the catch-all proposal and migrated
it back to its original page:
http://wiki.ecmascript.org/doku.php?id=strawman:proxies

The changes between v1 and v2 in a nutshell: in this iteration, we allow
proxies to also trap the methods defined on "Object", such as
"Object.getOwnPropertyDescriptor". In v1, these methods exposed proxies as
empty objects to user code. In v2, the proxy can trap all
object-interaction, enabling it to fully emulate regular objects.

In principle, user code can only distinguish between trapping proxies and
regular objects by means of the provided built-in method
"Proxy.isTrapping(obj)" method. This makes it easy to reintroduce the v1
semantics using v2 proxies, as shown here: <
http://wiki.ecmascript.org/doku.php?id=strawman:proxies#interaction_with_object._introspective_api
>

We also added a new example that shows how catch-alls can be used to
implement higher-order messages:
<
http://wiki.ecmascript.org/doku.php?id=strawman:proxies#higher-order_messages
>

Cheers,
Tom

On Mon, Dec 14, 2009 at 6:56 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Link is:
>
> http://wiki.ecmascript.org/doku.php?id=strawman:proxiesv2
>
> Please feel free to overwrite the original proposal with this page's
> wiki-contents and remove the v2 page (by removing its contents).
>
> One comment: I don't see a response to the order-of-evaluation question in
> comment 4 of:
>
> https://mail.mozilla.org/pipermail/es-discuss/2009-December/010308.html
>
> /be
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20091222/5e0aa0b7/attachment.html>


More information about the es-discuss mailing list