B.3.1 The __proto__ pseudo property

Brendan Eich brendan at mozilla.com
Tue Apr 23 06:50:51 PDT 2013

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.

I do not recall us ever agreeing that the bracketed 
property-name-in-literal syntax was *only* for symbols.


More information about the es-discuss mailing list