On Wed, Jan 23, 2013 at 8:59 AM, Mark S. Miller <[email protected]> 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.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

