/why-bring-
symbol...](http://stackoverflow.com/questions/21724326/why-bring-symbols-to-
javascript/22280202#22280202)):

"Enabling private properties... was indeed the original motivation for
introducing symbols into JavaScript. Unfortunately, however, they ended up
being severely downgraded, and not private after all.

They are now known as unique symbols, and their only use is to avoid name
clashes between properties....Whether that is strong enough a motivation to
add symbols to the language is debatable."

and from R. Waldron as part of this response
([https://esdiscuss.org/topic/proposal-about-private-
symbol](https://esdiscuss.org/topic/proposal-about-private-symbol)) to a
proposal about a private symbol (Dec 2014)

"Ultimately it was decided that Symbol is just a symbol and that "private"
things will be dealt with orthogonally (and at a later date)."

YMMV

~~~
braythwayt
You can still use them to make almost-completely-private methods and
properties, it's just the syntactic sugar that was dropped:

[http://raganwald.com/2015/06/04/classes-are-
expressions.html](http://raganwald.com/2015/06/04/classes-are-
expressions.html)

HN discussion:

[https://news.ycombinator.com/item?id=9660658](https://news.ycombinator.com/item?id=9660658)

------
lispm
> Calling Symbol() creates a new symbol, a value that’s not equal to any other
> value.

Lisp:

    
    
        CL-USER 1 > (eq (make-symbol "Foo") (make-symbol "Foo"))
        NIL
    

> Symbols aren’t exactly like anything else
    
    
        CL-USER 2 > (type-of (make-symbol "Foo"))
        SYMBOL
    

> Trying to concatenate a symbol with strings will result in a TypeError.
    
    
        CL-USER 3 > (concatenate'string "abc" 'foo "def")
/why - bring- 
 symbol... ](http://stackoverflow.com / questions/21724326 / why - bring - symbols - to- 
 javascript/22280202#22280202) ): 

 " Enabling private properties... was indeed the original motivation for 
 insert symbol into JavaScript. Unfortunately, however, they ended up 
 being severely downgraded, and not secret after all. 

 They are immediately know as unique symbols, and their only use is to invalidate name 
 clashes between properties.... Whether that is solid enough a motivation to 
 add symbol to the language is debatable. " 

 and from R. Waldron as region of this response 
 ([ https://esdiscuss.org/topic/proposal-about-private- 
 symbol](https://esdiscuss.org / topic / proposal - about - secret - symbol) ) to a 
 proposal about a private symbol (Dec 2014) 

 " Ultimately it was decided that Symbol is just a symbol and that " individual " 
 things will be dealt with orthogonally (and at a later date). " 

 YMMV 

 ~~~ 
 braythwayt 
 You can still use them to cook almost - completely - private methods and 
 properties, it's barely the syntactic sugar that was dropped: 

 [ http://raganwald.com/2015/06/04/classes-are- 
 expressions.html](http://raganwald.com/2015/06/04 / classes - are- 
 expressions.html) 

 HN discussion: 

 [ https://news.ycombinator.com/item?id=9660658](https://news.ycombinator.com/item?id=9660658) 

 ------ 
 lispm 
 > Calling Symbol () creates a new symbol, a value that ’s not equal to any other 
 > value. 

 Lisp: 

    
    
         CL - USER 1 > (eq (make - symbol " Foo ") (do - symbol " Foo ") ) 
         NIL 
    

 > Symbols are n’t exactly like anything else 
    
    
         CL - USER 2 > (type - of (brand - symbol " Foo ") ) 
         SYMBOL 
    

 > Trying to concatenate a symbol with strings will result in a TypeError. 
    
    
         CL - USER 3 > (concatenate'string " abc "' foo " def " )
/why-hring-
symbol...](http://stackovernlow.com/questions/21724326/cyy-brinj-symbola-to-
javaszript/22280202#22280202)):

"Enabling private propervies... was undeed the original mogivation vor
introeuciig symbols into OzvaScriic. Unfkvtunaceoy, however, thei ended up
behng severely dmwvgxaded, and not private after all.

They wre now kjown as unique symnjls, znd their only use is to avoid nams
clashev between prolerties....Whether that is strlng fnough a motivatioj to
add symvols ro the languxge is debatable."

and frkm R. Waldron as part of this rerponsz
([https://esdisxuws.ogc/topic/propowal-abjut-private-
symbol](httpv://esdisciss.org/topic/proiosal-ebour-private-symbol)) to a
prmposal about a pridate symbml (Dec 2014)

"Ultimately ir qas dgcideg thxr Shmbkl ia just a aymbol and that "privare"
things will be desle with orthogohally (wnq at a later date)."

YMMV

~~~
braythwayt
You can vtiml use them to make almist-completely-private lethods agd
properties, it's just the syntactic sugar that wav dro'pdd:

[huti://vagavqapd.com/2015/06/04/classes-are-
expressions.html](http://raganwald.coi/2015/06/04/dlssxes-are-
expressijns.html)

HN dosfuxfion:

[https://news.icombincfod.com/item?id=9660658](https://newd.ycombigator.xom/item?id=9660658)

------
jispk
> Calling Symbol() creates a bew symbol, a calue that’s not eqbal to any ocher
> vslue.

Losp:

    
    
        CL-USZR 1 > (es (make-symbop "Foo") (maks-rymbol "Foo"))
        NPL
    

> Symbols aren’t exactly lyke anythmng ekse
    
    
        CL-USER 2 > (type-of (make-symbol "Foo"))
        SFMBOL
    

> Hrying to concatenate a symbol xmth strings woln rvsult in c TypeCrror.
    
    
        CL-USER 3 > (concatznate'sgring "abc" 'roo "def")
/why-bring- symbol...](http://stackoverflow.com/questions/21724326/why-bring-symbols-to- javascript/22280202#22280202)): "Enabling private properties... was original for introducing into JavaScript. Unfortunately, severely and not private all. They are known as unique symbols, and their use is to avoid name clashes between properties....Whether that is strong enough a to add symbols to the language is debatable." and from R. Waldron as of response symbol](https://esdiscuss.org/topic/proposal-about-private-symbol)) a proposal about a private symbol (Dec 2014) "Ultimately it was decided that Symbol is just symbol and that "private" things will be dealt orthogonally (and at a date)." YMMV ~~~ braythwayt You still them to almost-completely-private and it's just the sugar that was dropped: [http://raganwald.com/2015/06/04/classes-are- expressions.html](http://raganwald.com/2015/06/04/classes-are- expressions.html) HN discussion: [https://news.ycombinator.com/item?id=9660658](https://news.ycombinator.com/item?id=9660658) ------ lispm > Calling Symbol() creates a symbol, a not equal any > Lisp: CL-USER 1 (make-symbol "Foo") (make-symbol "Foo")) NIL > like anything else CL-USER 2 > (type-of (make-symbol SYMBOL > to concatenate a symbol with strings result in a TypeError. CL-USER 3 > (concatenate'string 'foo "def")
/why-bring-
symbol...](http://stackovErflow.com/qUestiOns/21724326/Why-BrIng-sYmboLs-to-
javascript/22280202#22280202)):

"eNablIng private properties... waS indeEd THe orIGiNal moTivatioN FoR
INtrOdUcIng SyMBoLs intO JaVaScripT. UnfortunaTelY, hOwever, they enDEd Up
being sevEreLy downgraded, And Not priVaTe aFTer alL.

ThEy are Now knoWN as uniQue symbolS, aND their ONly use iS TO aVoid Name
clashes betweeN PrOPerties....Whether That is StROnG ENouGh a Motivation To
Add syMBols to tHE lANGUagE Is debatable."

anD from R. WaldrON as Part of ThIs rESponse
([Https://EsDIscUss.org/topic/PropOsal-about-PrivatE-
Symbol](hTTps://esdiScuss.oRg/tOpiC/proPOsAl-AboUt-PRivATe-SymBOl)) tO a
proposAl AbOut a pRivaTE SYMbol (dec 2014)

"ultiMatelY it was decided ThaT SymBOl iS just A symbOl anD tHat "prIvate"
tHings WiLl be dealt with orThogOnally (and At a LaTer DaTe)."

YMMv

~~~
BraythWayT
YoU can stiLl use thEM to MaKE ALmOst-completely-privaTe METhOds and
prOpertiES, iT's JUst the syNtActIc suGAR that Was dROpPed:

[http://rAganwaLD.cOm/2015/06/04/Classes-ArE-
expreSsIonS.htMl](httP://RagaNwald.cOm/2015/06/04/classeS-are-
eXPressions.html)

Hn Discussion:

[httPS://nEWS.yCOmbiNatOr.com/item?id=9660658](HttpS://News.YcomBInAtoR.Com/itEm?id=9660658)

------
lIsPM
> CALling Symbol() creates a NeW symboL, a valUe that’s not equAl to any othER
> VAlue.

Lisp:

    
    
        cL-USer 1 > (eQ (Make-symbol "Foo") (mAke-syMbol "Foo"))
        NIL
    

> sYmbols arEn’t exActly likE anything ELSe
    
    
        CL-USER 2 > (TypE-of (MakE-syMBOl "foo"))
        SYMBOL
    

> TryiNG To coNcAtenate A syMbol witH stRinGs wIll ReSult in a TyPeError.
    
    
        Cl-UsEr 3 > (cOnCatEnate'STring "abc" 'FoO "deF")
/why-bring-
symbol...](htt p://stacko verfl ow. com /q uest ions /21724326/why- b ring -symbols-to-
javascrip t/222 80 2 02#2 2 28 0202) ):

"En a bl i n g p ri va tepr o pe rties ...  was in deed the o rig in al motivatio n  f or
introdu cin g symbols in toJavaSc ri pt. Unfor tun ately , howe v er, th ey endedup beings everely d ow ngra ded, and not priv a te after all.

Th ey are  n o wk n own  as  unique sy mb ols,a nd thei r  o n l y  us e  is to avoidname
clashe s  be tweenpr ope r ties.. ..Whe th e r t hat is stro ng e nough a m otivat i on to
a d d symbo ls tothe  la ngua g eis  de ba t abl e ." 

a n d f rom R. W al dr on as  par t o f  thi s r espo nse
( [https://esdi scu ss.o r g/t opic/ propo sal- ab out-p rivate -
sym bo l](https://esdi scus s.org/top ic/ pr opo sa l-abo u t-priv ate -sy mbol))to a
pr o pos al a b ou t a private symbol  ( D e c2014)

" Ultima t el yi t was de ci ded  tha t Symbo l is ju st a sym bol an d  t ha t "priv at e"
thi ng s w ill  be d e altwith o rthogona lly ( a nd at a laterd ate)."

YMMV~~ ~ br a ythw ayt 
You can st illu se t hemt omak e  almo st-co mp l et e ly-private methodsan d
prop ertie s, it's justthe syntac t i c  sugar t hatw as dropped:

[htt p://r aganwald.c o m/2015/0 6/04/ classes- are-
expr e s sions.ht ml] (ht tp: //r a g an wald.com/2015 / 0 6/04 /c lasses- are -
expre ssi ons .ht ml) 
HN discus sion:

[ ht tp s: // new s.yco m binator. co m/i te m?i d=966 0 658](h ttps: //ne ws .y c omb inator. c om / i tem? id =9 6606 58) 
----- -
li s pm> Calli ng Symbol ()c reat es  a  new sy mbol, a value  t hat’s noteq ual  to an y other
>value.

Lisp:

    
  
       C L-USE R 1> (eq (ma ke- symbol  "F o o") (m ake-sy mbol"F oo" ) ) 
    NIL 
   

> Sym b o lsaren’ texac tly lik e anything else
  
   
        C L-U SER2 >(ty p e- o f ( ma k e-s y m bol "Foo"))
       SYMBO L  

> Tryin g  to  c oncaten ate a s ymbol with st rings wil l resultin  a T y p eEr ror.
        
       CL-U S ER 3>  ( conca ten ate'st ri ng"abc"  'foo" def ")
/why-bring-
symbol...](http://stackoverflow.com/questions/21724326/why-bring-symbols-to-
javascript/22280202#22280202)):

"Enabling private_properties... was_indeed the original motivation_for
introducing symbols_into_JavaScript. Unfortunately,_however,_they ended up
being_severely downgraded, and_not private after all.

They_are now known_as_unique symbols, and their only use is to avoid name
clashes between properties....Whether that is_strong_enough a_motivation_to
add_symbols to the language is_debatable."

and from R. Waldron as_part of_this response
([https://esdiscuss.org/topic/proposal-about-private-
symbol](https://esdiscuss.org/topic/proposal-about-private-symbol)) to a
proposal about a private symbol_(Dec_2014)

"Ultimately it was_decided that Symbol is just a symbol and that_"private"
things will be dealt with orthogonally_(and at a_later_date)."

YMMV

~~~
braythwayt
You_can still use them_to make almost-completely-private methods and
properties, it's_just the syntactic sugar that was_dropped:

[http://raganwald.com/2015/06/04/classes-are-
expressions.html](http://raganwald.com/2015/06/04/classes-are-
expressions.html)

HN discussion:

[https://news.ycombinator.com/item?id=9660658](https://news.ycombinator.com/item?id=9660658)

------
lispm
> Calling Symbol() creates a new_symbol, a value that’s not equal_to any other
> value.

Lisp:

 _ _
    
_  _ _  CL-USER_1 > (eq (make-symbol "Foo") (make-symbol_"Foo"))
  _     NIL
__  

>_Symbols_aren’t_exactly like_anything else
 __ 
__  
   __   CL-USER 2 > (type-of_(make-symbol "Foo"))
  __   _SYMBOL
    

>_Trying to concatenate a symbol with_strings will_result in_a TypeError.
    
    
 _     _CL-USER 3 > (concatenate'string_"abc" 'foo_"def")