Two kinds of [] (was: Re: shortcuts for defining block-local private names, plays nicely with @foo syntax)

Axel Rauschmayer axel at rauschma.de
Mon Jan 23 12:39:54 PST 2012


> Losing generic [] as a way to access all "native" properties of the object is big price.

I wonder if it really is such a big price: isn’t [] mainly used for objects as maps from strings to values? Then you should use something else in ES6, anyway (SimpleMap, possibly dict, possibly other map implementations). For the few remaining cases, Object.getProperty() (or something similar) should do just fine.

-- 
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/20120123/53ef0db4/attachment-0001.html>


More information about the es-discuss mailing list