On Jan 26, 2011, at 11:02 AM, David Bruant wrote:

>> On the question of proxy parameters for all traps (well, receiver for get 
>> and set): fewer args are better, and closure capture of proxy by handler 
>> avoids leaking the proxy to handler friends, if that matters. Likewise you 
>> can't get the handler from the proxy.
> If you handlers are frozen, there should be no leaking, shouldn't there? (I 
> actually think that freezing the handler should be done in the no-op 
> forwarding proxy example or any handler factory, but that's another issue).

No default freezing is going to be imposed. :-|


> About the closure capturing, it works only if one proxy is using the handler. 
> It doesn't if several proxies share it.

Good point.


>> These aren't absolute arguments, but I remember working through the 
>> alternative of a leading proxy parameter, both as JS hacker using proxies 
>> and in terms of SpiderMonkey's C++ implementation, and it was just bigger 
>> and less tidy, for both "sides" (JS and C++), without enough payoff.
> ... what about a trailing proxy parameter? It won't change anything on the 
> C++ side (by comparison to a leading parameter), but will on the JS side, 
> because you can omit the parameter if you don't need it.

Not a bad idea, and the C++ gurus can take it. Tom, Mark?

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

Reply via email to