new strawman: syntactic support for private names

Brendan Eich brendan at mozilla.org
Wed Aug 29 10:38:51 PDT 2012


Axel Rauschmayer wrote:
> The thought is this: If you use [] to access members of a collection 
> (array, map, etc.) then you’d still have the .@ operator to access 
> properties via computed names. Long-term, .@ would become the 
> recommended way of doing this.

The last sentence does not follow, even if we make obj. at privateName and 
obj. at stringName both work.

I'm not (just) saying we should not aspire to such a long-term migration 
to obj. at name over obj[name]. (I think that we shouldn't want that, btw, 
but it is not my point.)

I'm saying there is too much history and inertia to believe that just 
because you can do obj. at anyName, people will move their code to do that, 
or write all new code some years hence when old browsers have retired 
that uses only obj. at anyName.

/be


More information about the es-discuss mailing list