IIRC the purpose of separating the two was to encourage the idea that you should not normally iterate over both (because symbols will often be used to publicly obfuscate properties on an object).

Originally symbol keys were not enumerable at all. However it was hard to show that enumerating symbols should "never" happen -- and so a separate api was made to make it possible-but-more-inconvenient.

-Jeff

On 12/22/13, 7:52 AM, Axel Rauschmayer wrote:
https://github.com/rwaldron/tc39-notes/blob/master/es6/2013-09/sept-18.md#consensusresolution-1

Honest question: Is there any use case where you would *not* want to iterate over both?

If yes then I'd prefer to have getOwnPropertyKeys (in addition or instead of getOwnPropertySymbols).

Axel

--
Dr. Axel Rauschmayer
[email protected] <mailto:[email protected]>

home: rauschma.de <http://rauschma.de/>
twitter: twitter.com/rauschma <http://twitter.com/rauschma>
blog: 2ality.com <http://2ality.com/>





_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to