Being exposed to different paradigms helps a lot with flexible thinking. Trying out things like Erlang, OCaml and Lisp really gets you thinking about the concept of programming itself. However, they take a lot of getting used to. I always recommend C since it's familiar to most procedural programmers.
For Javascript programmers, I usually tell people to try out things that JS doesn't do. For example:
JS doesn't deal with memory at all. C helps you understand memory models better.
JS doesn't enforce any sort of structure. Trying a very rigid language like Java may help you structuring programs.
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.
JS's worker model is an odd way to do threading. Something like Stackless Python has lots of different ways to do multiprocessing and allows you to find the method that works for you.
I'll probably think of some other things later. I'll update when I do.
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.
View all comments
Show parent comment
2
u/[deleted] Jun 21 '18
Being exposed to different paradigms helps a lot with flexible thinking. Trying out things like Erlang, OCaml and Lisp really gets you thinking about the concept of programming itself. However, they take a lot of getting used to. I always recommend C since it's familiar to most procedural programmers.
For Javascript programmers, I usually tell people to try out things that JS doesn't do. For example:
I'll probably think of some other things later. I'll update when I do.