Re: Uniform proxy API via caching call and construct traps

2011-04-17 Thread David Herman
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

Uniform proxy API via caching call and construct traps

2011-04-13 Thread Sean Eagan
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