July 26, 2012 TC39 Meeting Notes

Tom Van Cutsem tomvc.be at gmail.com
Thu Aug 2 11:00:35 PDT 2012


[+samth]

2012/8/2 David Bruant <bruant.d at gmail.com>

>
>>  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120802/e8d580a6/attachment.html>


More information about the es-discuss mailing list