B.3.1 The __proto__ pseudo property

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Apr 23 07:00:59 PDT 2013

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.


More information about the es-discuss mailing list