Public/private namespaces in harmony classes proposal

Mark S. Miller erights at google.com
Thu Jul 7 21:49:57 PDT 2011


On Thu, Jul 7, 2011 at 9:41 PM, Gavin Barraclough <barraclough at apple.com>wrote:

> Hi Mark,
>
> In the harmony classes proposal,
> http://wiki.ecmascript.org/doku.php?id=harmony:classes , I'm interested in
> understanding the following issue:
>
>        One or two namespaces for public properties and private instance
> variables [RESOLVED two, Mark’s argument]
>
> Do you remember if this argument was made in email, and if so would anyone
> happen to know where to look to find this (I've tried a little googling to
> no avail!), I'd be interested in understanding the rationale behind this
> decision.
>
>
I don't think it was made in before in email. Here goes:

For non-const classes, their instances are extensible by default. Even if
you disagree with this default, I think we generally agree that there should
at least be an option to make extensible instances.

Say public and private share one namespace. Say extensible instance X has
private instance property 'foo'. Say a client of X tries to extend it with a
public 'foo' property. What happens?


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110707/8b465897/attachment.html>


More information about the es-discuss mailing list