r/ProgrammerHumor • • Jun 21 '18

Thanks Brendan for giving us the Javascript

Post image
3.1k Upvotes

302 comments sorted by

View all comments

Show parent comment

2

u/Johnny_Walker_Codes Jun 22 '18

I agree with this. I would probably go for C first, then attempt a functional language. Then when he's learned a functional language, he'll go back to Javascript and be like "damn this language is pretty damn functional".

JS is so weird, because it acts like a procedural language, but so much of it follows the functional paradigm. Everything is made via closures, most of the datatypes (possibly all of them) are immutable, first class and higher order functions, pattern matching (with es6 at least), etc. I think if he learns a functional language, he'll become a better JS dev.

JS has a very lenient type system. Trying a strongly-typed language like Go, where casting must be explicit, helps you realize where type incompatibilities may lead to issues.

Agreed, though I would choose Ada, it's about as strict as you can get, and is very structured. In 2009 when I was at university, the computer science program taught us Ada, when most other schools were teaching Java, and I am so happy they did. Ada is an awesome language. It's what fighter jets and nuclear reactors run on.

2

u/[deleted] Jun 22 '18

Ada is a good one too! Even though the industry had been moving away from it and onto C++. I just selected Go for the more familiar syntax.

And yeah, JS is a weird mix of paradigms. It's basically a lisp with c-like syntax, or an even quirkier Lua.