On Jan 23, 2012, at 12:21 , Herby Vojčík wrote: > Allen Wirfs-Brock wrote: >> I plan on proposing at the next TC39 meeting that we support .@ member >> accesses and that we replace the use of [expr ] to define private named >> properties in object literals ( >> http://wiki.ecmascript.org/doku.php?id=harmony:object_literals#object_literal_computed_property_keys >> ) with @identifier to define such properties. > > +1 for adding @foo:x to literals. > Not needing to remove [expr]:x, though.
Hopefully, [] will become a full application data domain construct [1][2] (and exclusively so). Then it makes no sense in object literals. However, @ could completely take over the program definition domain role of []: 1. Allow @ for both strings and name objects 2. Use @(expr) for property access via a computed name However, with built-in maps, I’m not sure how frequent the use cases for #1 and #2 will be. Object.getProperty(key) might be enough. [1] http://wiki.ecmascript.org/doku.php?id=strawman:object_model_reformation [2] http://www.2ality.com/2012/01/roles-objects-arrays.html -- Dr. Axel Rauschmayer [email protected] home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

