Capitalization: symbol vs. Symbol

Brendan Eich brendan at mozilla.com
Fri Jan 17 09:09:53 PST 2014


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:axel at rauschma.de>
> 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
> axel at rauschma.de <mailto:axel at rauschma.de>
>
> home: rauschma.de <http://rauschma.de/>
> twitter: twitter.com/rauschma <http://twitter.com/rauschma>
> blog: 2ality.com <http://2ality.com/>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list