Learn more programming languages, even if you won't use them
This article has been translated into Spanish: Por qué debes aprender más lenguajes de programación (incluso si no los vas a utilizar)
Imagine we’ve been handed a task and we’re free to choose the programming language. The assignment involves all sorts of string manipulation: reading strings, splitting strings, trimming, joining and running regular expressions over strings, everything in UTF-8 and, of course, emojis need to work. Which language do we choose? C? Oh, please no.
Another job, this time at a financial institution. We need to do tens of thousands of concurrent calculations. High performance is a hard requirement. Should we use… Ruby? Come on. Next up: a one-off script that renames a bunch of files… written in Java? A web browser… in Python? Programming a controller for a medical device with… C#? Swift? Lua? You get the point.
Different programming languages are good at different things and bad at others. Each one makes certain things easier and in turn others harder. Depending on what we want to do we can save ourselves a lot of work by choosing the language that makes solving the type of problem we’re facing the easiest.
That’s one of the tangible, no-nonsense benefits of learning more languages. You put another tool in your toolbox and when the time comes you’re able to choose the best one. But I would go one step further.
I think it’s valuable to learn new programming languages even if — here it comes — you never take them out of the box.
Languages shape the way we think*, each in their own peculiar way. That’s true for programming languages as well. Each language contains a different mental model, a different perspective for thinking about computation and how to write programs.
Every programming language is a lens through which we can look at the problem we’re trying to solve. Through some of them the problem appears convoluted, exhausting. Through others it doesn’t even look like a problem at all, it looks barely different from any other mundane thing one does in this language.
These new perspectives, these ideas and patterns — they linger, they stay with you, even if you end up in another language. And that is powerful enough to keep on learning new languages, because one of the best things that can happen to you when you’re trying to solve a problem is a change of perspective.
* This is known as linguistic relativity or the Sapir–Whorf hypothesis. In the context of this article I support the thesis in certain ways, but you should know that in the scientific community it’s validity is still very much open for debate. See this article for an introduction to the problems with the thesis.