Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

David Bruant bruant.d at
Mon Nov 26 12:39:24 PST 2012

Le 26/11/2012 20:59, Tom Van Cutsem a écrit :
> 2012/11/26 David Bruant <bruant.d at <mailto:bruant.d at>>
>     We could define a symbolic value (like StopIteration for
>     iterators) that would mean "forward to target". By essence of what
>     forwarding to the target means, there would be no need to perform
>     the least invariant check. We can call it ForwardToTarget :-)
> I think we've previously entertained a similar proposal when a handler 
> was encountering the .public property of a private property it didn't 
> know, and then wanted to signal to the proxy "I don't know this 
> private name, please forward".
True. I had the feeling the idea wasn't entirely knew, but I couldn't 
recall what was the inspiration for it.

> I recall one issue was that you'd really want a unique token per trap 
> invocation, which costs.
I don't understand why a unique token per trap invocation would be 

By the way, very much like for iterators, it would have to be "throw 
ForwardToTarget" instead of "return ForwardToTarget" because the symbol 
could be a value people would want to return while it would be a bad 
practice to expect a specific value to be thrown in a normal execution.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list