by goto11 · 6y ago · 0 comments
(1) Learn the language which is most prominent or employable in your preferred industry (e.g. Java for enterprises, Python for science, JavaScript for frontend).
(2) Learn the language most different to the first, regardless of its popularity and employability. Eg. Scheme if you know Java, Haskell if you know Python, Assembler if you know JavaScript. (There will probably be some disagreement about which languages are to most different to each other, but you get my point.)
However, I would word (2) a bit differently, otherwise tons of people will be learning INTERCAL and BrainFuck. For a second language, consider only languages that are at least popular enough to have good learning resources. (This is a pretty low bar... there are probably hundreds of such languages.) Look at which concepts and idioms are encouraged by each language, ignore those concepts and idioms encouraged by your first language, and try and score the usefulness of the remaining concepts and idioms. Do a bit of research reading up on the pros/cons of the idioms and concepts to help you score them.
The goal here is to pick up concepts and idioms by learning your second language, which will then diversify the way you think about your first language.
I would absolutely look at the machine code generated by one of your languages (or bytecode, if none of your languages compile to native code or have a JIT that can dump out assembly) to understand what's going on, but I wouldn't suggest learning to write assembler as one of your two first languages. Most of the usefulness of assembler can be gained from learning to read it.
Arguing that you specifically have to learn C to understand hardware is the gatekeeping I dislike the most, especially because it turns out that C itself can have a pretty bad view of hardware.
Knowing C is fine, but thinking C is somehow "the real world" is dangerous, since then you don't understand that the abstractions in C (like pointers or the stack) are just design choices with certain trade-off and that alternatives are possible.
Are you suggesting someone who knows say Haskell but not C is not able to debug their own programs?
What a ridiculous thing to say. One doesn't need to know how programming languages are implemented or 'how pointers work' or even know C in order to be a proficient programmer. This is just nonsensical gatekeeping.
This is true, but doesn't actually require knowing (or even having heard of) C specifically.
Those that learn to abstract concepts from how they get expressed on the language of the jour, are better prepared for change in this fashion industry.
I also never understood what it means being afraid of programming languages.
I haven't ever found Python to be useful since I started program. Perl, Bash, Ruby, JavaScript, etc. work equally well for one off scripts and Haskell works much better for mathematical calculations. For large programs I would never consider using Python. Maybe if I did machine learning my opinion would be different.
“A language that doesn't affect the way you think about programming is not worth knowing.”
Maybe go with Rust instead.