Ducks, Rabbits, and Privacy

Kevin Reid kpreid at google.com
Wed Jan 23 09:45:29 PST 2013


On Wed, Jan 23, 2013 at 8:59 AM, Mark S. Miller <erights at google.com> wrote:

> Hi Kevin, thanks for pulling this code example out of the gist and posting
> separately. Looking at it only in context before, for some reason I hadn't
> realized how beautiful this is. To support this pattern, your makePrivate()
> could be defined either in terms of either private symbols or weakmaps,
> right?
>
> Given how concise and beautiful this is, even if this is defined in terms
> of private symbols, I agree this looks much better than the square bracket
> syntax for accessing private fields. It also looks good enough that the
> hypothetical ES7 syntactic support doesn't look much better -- perhaps not
> better enough to be worth adding more sugar. As you say, this will give us
> enough experience with a usable privacy syntax that we can make a more
> informed choice for ES7 when it comes to that. Thanks!
>

FYI, this is essentially identical to the 'Confidence' abstraction I
developed for domado.js in Caja. Perhaps the choice could be further
informed by looking at how it's worked out there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130123/b50e3859/attachment.html>


More information about the es-discuss mailing list