Hacker News new | ask | show | jobs
by chrsig 1339 days ago
Learning different programming languages definitely helped expose me to new ideas, but I think it's a relatively shallow way to grow. There's only a few that I think are really worth learning for the sake of personal growth:

- both C and C++

- Some form of lisp. I could see julia taking this spot.

- Haskell

- SQL

There are obviously more that are worth learning for industrial use. Learning the above will give a solid understanding of how every other language works though, even if there's different semantics for a particular language.

When I was really into learning new languages, I think it was because I didn't have a good sense of how to do more challenging things.

At some point, I settled down and got more into projects that really require more domain knowledge. Writing an external merge sort, interpreter & compiler, a gameboy emulator, a disk persisted b+tree, ray tracing & physically based rendering, etc.

Those types of problems are what really pushed my boundaries and made me think more about how to solve problems. In the case of ray tracing & pbr, it forced me to learn some calculus, linear algebra, and statistics, which has been an incredibly rewarding experience.

It can be fun to imagine what solving a problem looks like in a language, because it may have some qualities that play to the strengths of a solution. At the end of the day, the languages are just tools people have come up with. Learning the quirks of C++ becomes less fun when you start to realize that it is the way it is because of how history unfolded rather than because of some interesting concept.

(edit: hn list formatting)

3 comments

I think it is impossible to make a list of programming languages that are worth learning. Just as a comparison, would you also make such a list for normal languages? English, Arabic and Chinese?

Choosing a language to learn depends on, among many more aspects:

* What style do you prefer. Return codes vs exceptions, small lambdas vs elaborate functions...

* What paradigms you find useful (procedural, functional)

* how do you think, rather mathematical, more in a state/execution way or more like cooking (recipes),...

* what applications do you like? Frontend to a store, embedded/industrial, mission critical,...

* simply taste. I hate ruby and love python. For a lot of people it is the other way around.

* do you love optimizing? For what memory, speed?

* Do you prioritize or advocate readability, maintainability, re-use?

In the end you have to choose your battles, you can't master all paradigms and styles in one lifetime.

But I think the point should be to get at least a taste of either end of every one of those continuums, so that you get a broad overview of what kinds of problems are well suited to different sets of tradeoffs. For another silly example, see the difference between rust’s collect and using generators in Python. Same end result with very different semantics.

Without this, there’s a risk that the “learning” is just tunneling in on your own pre-existing prejudices (insert hammer-nail metaphor here).

This holds for natural languages too!

I did a linguistics degree as an undergrad, and one of the requirements was coursework/proficiency in two different foreign languages. Unless you planned on actually using both of them, you were strongly encouraged to choose very different languages, rather than (say) Spanish and Italian.

Having learnt a Romance language, I took a year of intensive Japanese (the tones in Chinese were a bridge too far). It was a nightmarish amount of memorization and I juste eked out a passing grade, but the exposure to totally different writing, grammatical, and honorific systems was also really fascinating.

I understand what you mean and I agree for the most part. Still, there are multiple degrees of freedom for choosing languages, any list is just a proposal.
Right, but the presence of all those degrees means it’s valuable to at least dabble in many different languages, vs asserting that a list of just a few basically has it covered.
> I think it is impossible to make a list of programming languages that are worth learning

"Worth learning" is a subjective phrase, so it'll naturally be different for everyone. My list above was to give a list of languages that would cover as much of the spectrum as possible.

> would you also make such a list for normal languages? English, Arabic and Chinese?

No, for starters because I'm terrible with spoken languages and rather ignorant. But to make it a better comparison, I would say "learn one romance language" (or maybe just latin), or "learn one language written right-to-left".

If you were taking a painting class, it would be reasonable for the teacher to select some techniques to teach over others, or to showcase some select master painters to try and cover as much ground as possible in the course.

The idea being that you have a finite amount of time. Do you want to spend it getting a wealth of very similar experiences, or a broad appreciation.

Using your python vs ruby example: I think the more you learn, the smaller the differences between python and ruby are. There may be a profound difference on the experience of using either based on the users preferences and choices the languages made. But from a conceptual point of view, they're very close to each other.

> romance language

That's a language any person can learn :p

I think SQL is both the simplest to learn and most worthwhile in this aspect.

Why? Short answer - Because it doesn't have for loops.

It forces you to think about data in another way. It is like origami for programming. You can't brute force it, you have to fold your way to the result.

I understand what you are saying, but what you can end up with is stored procedures with loops.
What would you say the value is in learning some sort of lisp? I see the value in all the others, but lisp dialects tend to be pretty vanilla aside from their syntax. I can't think of anything you'd learn from lisp that you wouldn't from Haskell.
I think the big value is in learning to work with the AST itself, internalizing structure and representation. And how else are you supposed to enjoy SICP?
I’d imagine idiomatic use of macros.
Ah that makes a lot of sense.
Macros