
What programming language should you learn first? (Answer: JavaScript) - Osiris30
https://medium.freecodecamp.com/what-programming-language-should-i-learn-first-%CA%87d%C4%B1%C9%B9%C9%94s%C9%90%CA%8C%C9%90%C9%BE-%C9%B9%C7%9D%CA%8Dsu%C9%90-19a33b0a467d#.wd4cjsynu
======
ivraatiems
I don't agree with this. As someone studying JavaScript right now, I think
it's simply too irregular and quirky to make a suitable first language. Part
of learning your first language is being exposed to the underbelly of the
computing process, learning how things really work instead of how they appear
to work. That's already a complex and sometimes challenging process, and JS
makes it worse by adding layers of vagueness and unnecessarily confusing
design choices.

A good first language, in my opinion, is one that is regular and reliably
self-consistent and reasonable, so that you can focus on how the computer
science techniques powering it work and not on how it muddies them. Java, C#,
Python, and, yes, Lisp/Scheme are all good examples of languages that can do
this to greater or lesser extent. Something like C isn't a bad choice, except
that if anything, it gets too close to the metal (even intermediate-level
programmers with some experience struggle with pointers and references
sometimes). PHP, JavaScript, and honestly a lot of web technologies generally
are not good places to start. They're just too darn wacky.

~~~
ankurdhama
Those "wacky" things about any language are things that doesn't quite fit with
your knowledge of already learned languages.

~~~
shakna
JS is leaky. It's Type Coercion often relies on the inner string
representation of its objects. So many of its oddities come from this.

JS doesn't have integers. It only has floating point numbers, and the
complexity they can bring.

> 10.8 / 100 => 0.10800000000000001

Its inconsistency on dealing with things that become NaN confuse the hell out
of a good deal of people, because it simply doesn't reflect the way other
languages deal with it.

> Array(2).join("wat" \- 1) => NaNNaN

> Array(2).join("wat" \+ 1) => wat1wat1

JS is "wacky" because a programmer often has to understand implementation
details to debug.

A C programmer in rare cases may need to understand how their code translates
to assembly, yes. But it is incredibly rare.

A Python programmer almost never needs to understand how the object type is
constructed, or how instanceof works.

A Ruby programmer can get by without understanding how their numbers change
from integers to BigNums and back.

A Scheme programmer doesn't need to understand Cheney on the MTA or how their
compiler generates C code. It explains speed and other tradeoffs, but it
rarely if ever changes the actual code they write.

In JS, I have to be careful not to use arrays and currying together, because I
might get a false where I expected an array.

This isn't a language I would want to hand to someone who has never
programmed.

------
Communitivity
Your first language shaped how you look at all future languages. I was (am?)
an odd duck, and because of what I had available I learned lisp as my first
language. I think that has helped me a great deal, and would recommend it
highly to anyone learning programming. It sounds strange, and no you won't
likely be writing your next SAAS sw in lisp (though you could, check out
Seaside), but the investment will pay off when you learn your second language
(which should probably be Javascript, Java, or Python, depending on the market
you intend to work in).

~~~
i_feel_great
This is true for me as well, although I picked up Smalltalk first, then Lisp
(Scheme actually). After learning Smalltalk learning Java, C#, and Python just
meant learning the details. Ditto with how Scheme made it easier to learn
OCaml and Erlang.

