has the syntax for proxies been finalized ?

Tom Van Cutsem tomvc.be at gmail.com
Mon Oct 21 07:20:18 PDT 2013

2013/10/18 Allen Wirfs-Brock <allen at wirfs-brock.com>

> This is what I currently have in my working draft of the ES6 spec:
> [...]
> In other words:
>   you can say:
>        Proxy(traget,handler)
>   but not
>         new Proxy(target, handler)
> It would be easy enough to allow
>         new Proxy(target,handler)
> but I'm not sure it is the best way to expose the Proxy abstraction .
> Proxy really isn't a "class".  There is no Proxy.prototype object and  obj
> instanceof Proxy isn't useful. Also the @@create protocol really isn't
> right for instantiating Proxies.  Subclassing a Proxy isn't going to give
> you anything that is useful.

I agree with your line of reasoning and I would be happy if proxies can be
created without `new`. However, I don't see how the above spec disallows
the use of `new`. With the above definition, won't `new Proxy(target,
handler)` just work? (since the Proxy function just ignores its

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131021/10c32463/attachment.html>

More information about the es-discuss mailing list