Tom Van Cutsem wrote:
2013/1/15 Herby Vojčík <he...@mailbox.sk <mailto:he...@mailbox.sk>>
Is it needed? Maybe the "fail/forward" decision canbe set
beforehand, when creating the proxy. Then, no trap will be called
(but you cannot change the response in time; OTOH, is there a use
case for it?).
Or does it do something more sophisticated then just telling
"forward" or "fail" for situation that I am accessing some unknown
private symbol?
Here's one example where the decision would need to be dynamic: a
revocable reference (not a membrane) that wants to just forward all
operations to the target until revoked. When revoked, it does not want
to forward anything anymore, including private symbol accesses.
These use cases can be made dynamic be some kind of
Proxy.fromNowOnForwardUnknownPrivateSymbols(proxy, false);
API. This is not truly dynamic. I'd say no truly dynamic use cases
exist, where you must decide _at_the_exact_point_of_access_. IMO.
That said, if this is not an important use case, I'm open to making the
decision static. I'm not too fond of the "unknownPrivateSymbol" trap.
Cheers,
Tom
Herby
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss