Symbols are not value objects, they are primitives like strings, and the
'Symbol' function is analogous to 'String'. See
http://esdiscuss.org/notes/2013-09-18
Consensus/Resolution
* Symbols are a new primitive type with regular wrapper objects
* typeof symbol === "symbol"
* implicit conversion to string throws
* new Symbol throws
* Symbols are public, not private - ok that they leak to Proxy
* Symbols are unique
* Only exposed via Object.getOwnPropertySymbols instead of
Object.getOwnPropertyKeys
* |Object.mixin| copies both symbol and string properties
/be
Axel Rauschmayer <mailto:[email protected]>
January 17, 2014 8:26 AM
Given that all upcoming value object constructors will start with
lowercase letters, shouldn’t Symbol, too?
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