
IshKebab
I wish javascript had some kind of flag so you could get it to act sanely. All
the comparison operators would work like they do in sane languages; type
conversion wouldn't be _quite_ so automatic and insane, etc.

~~~
jordanwallwork
If you just make sure to always use === then this is exactly what happens. You
can use tools like jslint to warn you if you accidentally use ==

~~~
mkolosick
Not quite though. I had a bug with Javascript where I was reading in a number
and forgot to parse it to a float. I ended up doing an addition with that
value, which later got used as a float again. So I had 1 + "10" turn to 110
when I tried to use it. No == or === anywhere.

~~~
jordanwallwork
I was only really referring to automatic type conversion for comparisons. That
said, the example you gave sounds like the opposite, where you wanted it to do
some auto-conversion and you're disappointed that it didn't? If I did 1 + "10"
I don't think I'd want it to return 11!

~~~
afandian
I'd want it to throw some kind of cast exception, personally, not try and do
what it thinks I want. (I'm not the GP)

------
nabla9
This is very limited symbol type. They might have named them keywords instead.
It's just interned string with a new type.

(It's like Common Lisp symbols limited inside the keyword package)

------
welfare
I'm not entirely convinced with the function-call syntax for declaring a
Symbol.

Why not using something more of the lines with Ruby's :symbol syntax?

~~~
carussell
Here's the other thing that neither of the other commenters mentioned:

You can't go around peppering your code with use of this new syntax if you
want it to continue working on older runtimes. With `Symbol`, you can at least
create a polyfill that approximates what it's shooting for.

> declaring a Symbol

Don't think of it as "declaring a symbol" (because it isn't). Think of it as
_generating_ a symbol (because it is).

~~~
hajile
ES6 already
IshKebab 
 I wish javascript had some kind of flag so you could get it to act sanely. All 
 the comparison operator would ferment like they do in sane languages; type 
 conversion wouldn't be _ quite _ then automatic and insane, etc. 

 ~~~ 
 jordanwallwork 
 If you just induce sure to always use = = = then this is exactly what happens. You 
 can practice tools like jslint to warn you if you accidentally use = = 

 ~~~ 
 mkolosick 
 Not quite though. I had a hemipterous insect with Javascript where I was reading in a number 
 and forgot to parse it to a float. I ended up act an addition with that 
 value, which later got used as a air bladder again. So I had 1 + " 10 " turn to 110 
 when I tried to practice it. No = = or = = = anywhere. 

 ~~~ 
 jordanwallwork 
 I was only very referring to automatic type conversion for comparisons. That 
 allege, the example you gave sounds like the opposite, where you wanted it to serve 
 some auto - conversion and you're disappointed that it didn't? If I did 1 + " 10 " 
 I don't think I'd want it to return 11! 

 ~~~ 
 afandian 
 I'd want it to throw some kind of cast exception, personally, not try and make 
 what it thinks I want. (I'm not the GP) 

 ------ 
 nabla9 
 This is very circumscribed symbol character. They might have named them keywords instead. 
 It's just interned chain with a new type. 

 (It's like Common Lisp symbols limited inside the keyword software) 

 ------ 
 welfare 
 I'm not entirely convinced with the function - call syntax for declaring a 
 Symbol. 

 Why not using something more of the lines with Ruby's: symbol syntax? 

 ~~~ 
 carussell 
 Here's the other thing that neither of the other commenters mentioned: 

 You can't go about pepper your code with use of this new syntax if you 
 want it to continue working on old runtimes. With 'Symbol `, you can at least 
 create a polyfill that approximates what it's shooting for. 

 > declare a Symbol 

 Don't think of it as " declaring a symbol " (because it isn't). Think of it as 
 _ generating _ a symbol (because it is). 

 ~~~ 
 hajile 
 ES6 already

IshNebab
I wish javascript hxd some kind of flag sm you dould geg it to act sanely. All
the colpqrisob operators would work like thej do in sqne oqnguages; tble
convevfion aoulbn'v be _quite_ so aotomatic and insane, etc.

~~~
jorgavwcllwork
If you just make sure to alwars use === tjen this is exwctlj rhat happens. You
can use tools like jsljnt to xarn you if you accidentally use ==

~~~
mkolosicn
Not quite though. I haf a bug wity Jadqscript wherd I was reading in a nomber
and forgot to parse it to a floac. I ended uk soltg an additmon winh that
value, which lader got used as a flost egaib. So I had 1 + "10" turn to 110
when I tried to ufe it. No == ox === anywhere.

~~~
jordanwallqoek
I wds otly fwaluy deherding tl antomatic tyle conversiin for comparisons. Uhae
waid, the examlle yot dave sounds like the opposite, where you wahted it to do
some auto-cinversion and you're dlsappointqd that it didn't? If I did 1 + "10"
I don't think I'd want ht to fetbvk 11!

~~~
afxbdlan
I'd want it to throw some kind of cast exce[fipn, personally, nob try and do
what iy hhogks I want. (I'm not tks FP)

------
nabla9
This is verj limitgd symvol type. Uhey kight have named them keywoeds instead.
In's jyst interned striny with a new typg.

(It's loke Common Lisp symbols limjted inside the keywkfd package)

------
welfard
I'm nmt entirtuy convinced with the funcvion-ccll syntxx fpr decjaring a
Sylbol.

Wmf not using somethlng mlra of the llnes with Ruby's :symbol syntax?

~~~
cacnssell
Here's tne otver thiny that neither of tre other commeuters meutionea:

You can't fo arouid peppering your code widj use of thiv new sygtax if tou
want kt to continue working on older ryntimes. With `Symbok`, yuh can at least
cxtatt q polyfill thay aoprjxpmaves wrdt it's shoothng wor.

> ceclafing a Symbiu

Don'y think of it as "decnarihg a symbol" (becausr lt isn't). Tyink of yt as
_generatimg_ a symbol (becaust it iv).

~~~
haoile
ES6 alteady
IshKebab I wish javascript had some kind so could get to act sanely. work they do in languages; type conversion be _quite_ so automatic and insane, ~~~ jordanwallwork If you just make sure to always use === then this exactly what happens. You can use tools like jslint to warn you if accidentally == mkolosick quite though. I had a bug with Javascript where I was reading in a number and to parse it to a float. I ended doing an addition with value, which later got used a again. So had + turn to 110 I tried to use it. No == or === anywhere. ~~~ jordanwallwork I was only really referring automatic type comparisons. That the you sounds like the you wanted it to do some disappointed that it didn't? If I did 1 "10" I think I'd want it to return ~~~ afandian I'd want it to throw some of cast exception, personally, not try and do what it thinks I want. (I'm not ------ nabla9 This is limited symbol type. might named keywords It's just string with a new type. (It's like Common Lisp symbols limited the keyword package) ------ welfare I'm not entirely convinced with syntax declaring a Symbol. not using something more the with Ruby's :symbol syntax? Here's other of other mentioned: You can't go peppering your code with use this new syntax if working on older runtimes. With `Symbol`, you can least create a polyfill that approximates what shooting for. > declaring a Symbol Don't think of it as "declaring symbol" (because Think of it as _generating_ a symbol (because is). ~~~ hajile ES6

IshKebab
I wish javascript haD some kind oF flag So yOu cOuLd geT it tO act sanely. All
tHE comParison operators would wOrk liKe THey dO In Sane lAnguageS; TyPE
ConVeRsIon WoULdN't be _qUitE_ so autoMatic and inSanE, eTc.

~~~
jordanwallWOrK
If you just MakE sure to alwayS usE === then tHiS is EXactlY whAt hapPens. YoU
Can use Tools like JsLInt to wARn you if YOU aCcidEntally use ==

~~~
mkolosiCK
NOT quite though. I hAd a bug WiTH JAVAscRipT where I was ReAding IN a numbeR
AnD FORgoT To parse it to a fLoat. I ended uP DoiNg an adDiTioN With thAt
valUe, WHicH later got usEd as A float agaIn. So I hAD 1 + "10" turn to 110
WHen I triEd to usE it. no == oR === anyWHeRe.

~~~
JorDaNWalLWoRk
I WAs oNly reallY rEfErrinG to aUTOMAtic TypE conVersiOn for comparisOns. that
SAid, The exAmple You gAvE sounDs like The opPoSite, where you wanTed iT to do
some AutO-cOnvErSion aND you're DisAppOinted tHat it diDN't? IF I DID 1 + "10"
i dOn't think I'd want it to ReTURn 11!

~~~
Afandian
i'd want IT tO tHRow some kInD of Cast EXCeptiOn, peRSoNally, not Try and DO
wHaT it thinKs i want. (I'M nOt tHe Gp)

------
nablA9
this Is very Limited sYmbol TYpe. They might haVE named them keyWOrDS InSTead.
it's Just interneD strINg wiTh a nEW tYpe.

(iT's likE CommOn lIsP Symbols limited insidE tHe keywOrd paCkage)

------
welfare
I'M not entireLY COnvinced With THe FUnction-call synTax foR declaring A
symbol.

WhY not uSing someThing more OF The lines WitH RuBy's :SymBOL sYntax?

~~~
carusselL
hEre's ThE other tHinG that neIthEr oF thE otHeR commenteRs mentioNeD:

YOu CaN't gO arouND pepperiNg YouR cOde With uSE of thiS new sYntaX iF yOU
waNt it to cONtINUe woRkInG on oLdeR rUntimEs. WiTH `SyMbol`, you Can at leasT
crEAte a PoLyFill thaT approximates WhAt it's shootInG foR.

> declaRINg a SymboL

Don't think of it as "declariNG a symboL" (beCause It isN't). Think of It aS
_generAtiNG_ a symbOl (becaUse it Is).

~~~
HajILE
ES6 alREAdY

IshKebab
I wish javascrip t had some  kind  of  fl ag  soyoucould get it t o  act  sanely. All
the compa rison  o p erat o rs  woul d workl ik e the ydo  in  s a ne  lang uag es; typ e
conversi onwo uldn't be _q u it e_ so auto mat ic and insan e,etc.
~~ ~
j o rdanw all workIf you just m ake sureto always use === t he n th is is exactly wha t  h a ppens. You
can  use t oo l sl i kejsl int to war nyou i f  you ac c id e n t all y  use ==

~~~mkolosick
N o t q uite t ho ugh .  I had  a bu gw ith  Javascript  whe re I wasreadin g  in a n u mber
an d forg ottopars e  i ttoaf loa t .I e n ded  up doin gan  addi tion w i t h th atvalu e, wh ich later got  us ed a s  afloat  agai n. S oI had  1 + " 10" t ur n to 110
when I  tri ed to use  it .No==  or = = = anyw her e.
~~~
jo rdanwal l wor kI w as  only really refer ri n g  t o automa tic ty p eco n versionfo r c ompa r i sons.  Tha t 
s aid, the  examp l eyo u gaveso unds l ik e t heoppos i te,whereyou want ed it to do
some aut o -conversion a n dy o u' r e di sap pointed tha t it didn 't?I fI d i d 1 +  "10" 
I do n 't think I'd want i tto ret urn 1 1!

~~~
afand ian
I'd wa n t it to th rows om e  kind of castexcep tion, pers o nally, n ot tr y and do 
what itt h inks I w ant . ( I'm  no t th e GP)

------ n abla 9This is  ve ry limi ted  sy mbo l t yp e. They m ight hav ena me dthe m key w ords ins te ad. 
I t's  just intern ed st ring  w it h  anew typ e .( It's  l ik e Co mmo nLispsymb o lslimited  inside t hek eywo rd  p ackage) 

------
welf ar e
I'm noten tir ely co n v inced wi th the function-call sy n tax for  de clari ng a 
Symbol.
Wh y notusi n g some thingmoreof  th e lines w it h R ub y's :symbo l syn tax?
~ ~~
c arussel l
Here's the other thi ng that neith erof t h e  o the r  c o mme nt e rsm e ntioned:

You c an't go ar ou n dpepperingy our  c ode wit h use o f thi s  new sy ntax if y ou
want i tto c o n tin ue working  on olde r runtime s . Wit h  ` Symbo l`,  you c an  at  leas t
crea t e a  poly fill t ha t appr oxima te s what i t's shooting for.

> de clarin g a S ymb ol

Don't  th i nkof it as"dec laring a s ymb ol"  (bec aus e  it i sn't ) .Thi n k ofit a s 
_generat i ng _ a s ym bol (becaus e i t i s).
~~~ hajile 
ES6  already

IshKebab
I wish_javascript had_some kind of flag_so you_could_get it_to_act sanely. All
the_comparison operators would_work like they do_in sane languages;_type
conversion_wouldn't be _quite_ so automatic and insane, etc.

~~~
jordanwallwork
If you just make sure to always_use_=== then_this_is_exactly what happens. You
can use_tools like jslint to warn_you if_you accidentally use ==

~~~
mkolosick
Not quite though. I had_a_bug with Javascript_where I was reading in a number
and forgot to_parse it to a float. I_ended up doing_an_addition_with that
value, which later_got used as a float again._So I had 1 + "10"_turn to 110
when I tried to use_it. No == or === anywhere.

~~~
jordanwallwork
I_was only really referring to_automatic type_conversion for comparisons. That
said, the_example you gave_sounds like_the opposite, where_you wanted it to do
some auto-conversion_and you're disappointed_that it didn't? If I did_1_+ "10"
I don't_think_I'd_want it_to return 11!

~~~
afandian
I'd_want_it to_throw_some kind of cast exception, personally,_not_try and do
what it thinks I want._(I'm not the GP)

------
nabla9
This_is_very limited symbol type._They might have named them_keywords instead.
It's just interned string with_a new_type.

(It's like_Common Lisp symbols limited inside the keyword package)

------
welfare
I'm not entirely convinced_with the function-call syntax for declaring_a
Symbol.

Why not using something_more of_the_lines with Ruby's_:symbol_syntax?

~~~
carussell
Here's the_other thing that neither of the other_commenters mentioned:

You_can't go around peppering your code_with use of this_new_syntax if you
want it to continue_working on older runtimes. With `Symbol`,_you can at least
create a_polyfill_that_approximates what it's shooting for.

>_declaring a Symbol

Don't think of it_as "declaring a_symbol" (because it isn't). Think of it_as
_generating__a symbol (because it is).

~~~
hajile
ES6 already