[+samth] 2012/8/2 David Bruant <[email protected]>
> >> To follow-up on that part, here is a gist with the difference between > what the current proposal is and the alternative proposal [1]. [...] > > [1] https://gist.github.com/**3232772 <https://gist.github.com/3232772> > Thanks for writing up that gist. Sometimes a piece of code says more than a 1000 words ;-) Your observation that the value to be set leaks to a setName/definePropertyByName trap is spot-on. It's indeed the dual of protecting the return value in the getName trap. I can imagine a solution that involves the trap returning a callback that will receive the value after it has proven that it knows the private name, but this is really becoming tortuous. Your proposed alternative is something to consider, although I'm still uncomfortable with the WeakMap.prototype.has.bind mechanic. We should also reconsider the simplest alternative of just not trapping private names on proxies. Sam, if I'm not mistaken, Racket has both names and proxies (aka impersonators), can you shed some light on how those features interact? Do chaperones/impersonators need to treat names specially? Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

