B.3.1 The __proto__ pseudo property

Brendan Eich brendan at mozilla.com
Tue Apr 23 06:53:59 PDT 2013

David Bruant wrote:
> Le 23/04/2013 15:30, Allen Wirfs-Brock a écrit :
>>> * { [ "__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.
> I don't know what the agreement is, but that would be wise to forbid 
> strings in [ ] propert keys given that ES6 introduces Maps which seem 
> to be a better host for dynamically generated string keys.


Maps are for *abitrary values* as keys -- any type.

Objects have string-equated keys so far. In ES6 we sum symbol | string 
as the property name type. There is no problem with the o = {[n]: v} 
syntax for computed property name n (an expression, we argued about 
wither /Expression/ or /AssignmentExpression/ but I forget the outcome) 
resulting in either a symbol, or else a value equated to a string as in 
object literals today.

> David

More information about the es-discuss mailing list