On Apr 23, 2013, at 3:50 PM, Brendan Eich wrote: > Taking bite-sized pieces: > > Allen Wirfs-Brock wrote: >>> > > * { [ "__proto__" ]: .... } is not special in any way, and creates a >>> > normal property named "__proto__". >> >> I don't believe this is legal. Didn't we agree w to support [ ] property >> keys that evaluate to symbols. > > No, [n] is good for any computed property name -- evaluating n and if symbol, > using that, else (doing the equivalent, e.g., engines optimize indexes) > converting to string -- Dave's ToPropertyName from the wiki, is all that's > needed here.
[n] in object literals and classes has come, gone, and reappeared. It originally allowed strings. I think the last time it reappear (when at-names were dropped) it was only for symbols. I need to go notes digging. Allen _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss