Harmony:classes static and private

Brendan Eich brendan at mozilla.com
Wed Jun 8 16:20:16 PDT 2011


On Jun 8, 2011, at 4:04 PM, Bob Nystrom <rnystrom at google.com> wrote:

> On Wed, Jun 8, 2011 at 3:40 PM, Brendan Eich <brendan at mozilla.com> wrote:
> No, it does not outlaw private and even public for class body elements that define (without static or whatever we use instead of static) prototype properties.
> 
> What do they accomplish? I'm guessing private places the property on the private record of the prototype. What does public do?

No "private record" fiction on a plain old object such as a class prototype. Rather, "private" creates a private name object denoted by the declared name and usable after dot by that name within the class body.

"public" is symmetric longhand for what methods, accessors, and assignments as class body elements do in the proposal.

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


More information about the es-discuss mailing list