Short answer: it depends.
If you are just getting started with programming, then I would recommend keeping it to one language at a time. This is because when you are starting out, there are a lot of things you are learning at once and the syntax and properties of the language are just one of those. Once you have established an understanding of good programming principles and how to use the tools of the trade, then you’ll have the skills and context you need to appreciate the differences between languages and weigh their pros and cons for your next project.
To elaborate, when you are getting started, you’re not just learning a programming language. You’re learning how to organize your project, how to use your editing tools, how to run and debug your application, how to find and use libraries and frameworks, how to manage dependencies, and generally how to accomplish the thing your project is trying to do. Add to that list major coding concepts and patterns, like Separation of Concerns, keeping your code DRY, Composition versus Inheritance, and the patterns and anti-patterns of the platform you’re developing for, and you’ll start to appreciate how much you already have on your plate! They say that the best way to eat an elephant is a bite at a time, so do yourself a favor and stick to one language to get started and keep the new things to a manageable level.
On the other hand, let’s say you’ve got already got some good grounding in those concepts and you’re ready for something new. Should you consider learning a new language? Absolutely! Learning a new language highlights the differences between languages and makes you ask “why?” You will not only learn the new language – you will understand the languages you already know much better as well.
And, if you have the bandwidth for it and feel the desire to, you can even go for two new languages at a time. The most important thing is that you have a solid foundation to build upon. All of that being said, let’s turn for a moment to the question of why you are thinking about learning a new language and what to consider in making your selection.
A host of tools for every job
Unfortunately, it’s not quite as simple as one language per platform. There are often several available languages you could use for your project, so how do you choose the right one?
Perhaps the best example of death-by-options is in mobile development. Everyone who knows how to code (and almost everyone else) has wanted to build a mobile app at some point, right? It turns out there are many ways to do it, each with pros and cons. You could go fully native and learn Swift for iOS and learn Kotlin for Android, but that’s two languages you would have to learn to do one job, two code bases to develop whenever you add a feature, and two sets of native libraries to learn. That a lot of work!
So which one should you choose? There are two factors that make a new language the right fit:
How to pick your next language
1. Learning Gap
It’s great that you get to learn new things all the time – that’s one of the best things about developing software – but at the end of the day you are trying to accomplish something in the market. So when picking which language to use for the job, consider which language employs patterns and concepts that you are already familiar with so you can stay focused on solving the problem your project is intended to solve. Learning the patterns of a new language and how to debug it can make life hard for a developer when the pressure is on.
Next, consider how much community support there is for the languages you have to choose from. The best language is often the one where common problems have already been solved and you have ready access to help if you get stuck. One way to test the water is to go to a community hub like Github or StackOverflow and see how much activity there is around the language you’re considering. This also helps you identify the community favorite (if there is one). If a lot of people have landed on a particular language to solve problems similar to yours, there’s usually a reason and you should weigh that in your decision.
If you’re just starting out with programming, keep it simple and focus on building a foundation of good principles and practices in one language. Then, as the need arises, you will have legs to stand on when you want to expand your knowledge to new languages for solving new kinds of problem. When you do, you’ll not only learn a new language, but you’ll understand your first language with new perspective and renewed appreciation. All in all, you’ll become a better developer with a firmer grip on which differences between languages matter and which ones don’t.
When making your selection of what language to learn next, think holistically and pick the option that best helps you accomplish your goals both now and in the future. Consider the community support and your access to existing solutions to common problems. The broader and stronger the shoulders you have to stand on, the higher you can reach.
Finally, is it wise to learn two new languages at the same time? If you have a good foundation to stand on, and you see a legitimate need, then go for it my friend, and may the digital wind ever be at your back.