unknownPrivateSymbol trap (was: WeakMap better than Private Symbols? (was: direct_proxies "problem"))

Tom Van Cutsem tomvc.be at gmail.com
Tue Jan 15 13:20:34 PST 2013

2013/1/15 Herby Vojčík <herby at 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.

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130115/f33a15c5/attachment.html>

More information about the es-discuss mailing list