Re: getOwnPropertySymbols + getOwnPropertyNames

2013-12-23 Thread Jeff Morrison
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 sy

Re: getOwnPropertySymbols + getOwnPropertyNames

2013-12-22 Thread Andrea Giammarchi
I hope in addiction, since at least getOwnPropertyNames is slightly polyfillable ... having only a method that exposes both makes migration more painful, imho On Sun, Dec 22, 2013 at 7:52 AM, Axel Rauschmayer wrote: > > https://github.com/rwaldron/tc39-notes/blob/master/es6/2013-09/sept-18.md#c

getOwnPropertySymbols + getOwnPropertyNames

2013-12-22 Thread Axel Rauschmayer
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 --