shortcuts for defining block-local private names, plays nicely with @foo syntax

Axel Rauschmayer axel at
Mon Jan 23 04:14:27 PST 2012

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 (
>> ) 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.


Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list