> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> On Behalf Of Allen Wirfs-Brock
> Sent: Friday, November 30, 2012 19:18


> 1) Object.getOwnPropertyNames and Object.keys remain unchanged.  They only 
> return a string property key values.
> 2) Reflect.ownKeys(obj) is a new reflection function that returns an 
> iterator. The iterator produces the keys of all public own properties of the 
> object pass as an argument.  This includes both string and Symbol key values.

A minor qualm compared to all the other things being discussed here, but isn't 
it confusing to have "keys" mean two different things? In ES5 usage it means 
"enumerable, string-valued" whereas in this proposed Reflect.ownKeys it means 
"no qualifiers: non-enumerable OK, symbol-valued OK".

From an ES5 perspective, "property names" (as in getOwnPropertyNames) are 
"enumerable or non-enumerable string-valued" whereas "keys" are "enumerable 
string-valued." Ideally there would be a new designation for non-string–valued.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to