Public/private namespaces in harmony classes proposal

Brendan Eich brendan at mozilla.com
Fri Jul 8 08:15:50 PDT 2011


On Jul 8, 2011, at 7:43 AM, Juan Ignacio Dopazo wrote:

> My first thought was: why not just statically replace this.x, with private x, with this[xPrivateName] and forget about accessing private properties of other objects? That would still leave the problem of closures inside methods, though...

If xPrivateName is a private name object, then there's no reason to "forget about accessing private properties of other objects". Both this[xPrivateName] and other[xPrivateName] work as you would expect.

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


More information about the es-discuss mailing list