I don't like this idea. It's inconsistent with the behavior of the other traps, 
it relies too subtly on a funky stateful idiom, and it's hard to predict when 
the traps will actually fire (since it depends on how clients use the proxy). 
If there's something being set once-and-for-all I prefer it to happen up front 
and explicitly.

Dave

On Apr 13, 2011, at 8:16 AM, Sean Eagan wrote:

> Hi,
> 
> When the uniform proxy API [1] was being explored, was it ever
> considered to just cache the "call" and "construct" traps within the
> proxy during the Proxy.create() call rather than look them up each
> time the proxy is called as a function or constructor?  That seems to
> solve most if not all of the issues I've seen mentioned.  There is a
> precedent for this in that a constructor's "prototype" property is
> cached in the internal [[Prototype]] property of objects it constructs
> during the call to [[Construct]].
> 
> [1] http://wiki.ecmascript.org/doku.php?id=strawman:uniform_proxies
> 
> Thanks,
> Sean Eagan
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to