new strawman: syntactic support for private names

Axel Rauschmayer axel at rauschma.de
Tue Aug 28 16:59:45 PDT 2012


Couldn’t you have the same advantages if:
- obj. at foo was syntactic sugar for obj[foo]
- @foo was syntactic sugar for [foo] (method definitions, property definitions, etc.)

foo would be a normal variable and the following two statements would be equivalent:
     private foo;
     let foo = new Name();

foo containing a string would also work.

That would be slightly simpler and go together well with your proposed object model reformation [1]:
https://gist.github.com/3505466

[1] http://wiki.ecmascript.org/doku.php?id=strawman:object_model_reformation

On Aug 29, 2012, at 1:04 , Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:

> The strawman is at http://wiki.ecmascript.org/doku.php?id=strawman:syntactic_support_for_private_names 
> 
> Allen
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120829/2d335b8f/attachment-0001.html>


More information about the es-discuss mailing list