In the past strange year, we’ve spent less time looking out and more time looking inward—or at least we’ve spent more time with ourselves. For those of us stuck at home finding projects to occupy our time (or allow us momentary breaks from childcare), self-improvement has been the name of the game. For many, that may have even included learning a new programming language.
Choosing which language to pick up next is a personal and sometimes labyrinthine process: it can come on the back of a trend in software development, or it can come out of the combined elements of interest, need, and even community. You may want a high-level language, a functional language, or simply something that will do just what you want it to when you need it most. The choices can be as personal as they are varied.
Still, even if the reasoning behind learning a language is deeply personal, the benefits of learning a second language fall into clear categories. Programmers learn a new language in order to take advantage of new libraries, use new hardware, achieve new programming capabilities, or even gain a broader understanding and perspective on programming choices.
This year, we examine how each of these categories has been influenced by trends in software development and in the new features being added to the languages themselves, and how this might influence your choices of what new languages to pick up in 2021.
More often than not, it’s the library you choose, not the language.
Machine learning is currently everywhere, and Python is currently everywhere in machine learning. This is because Python has good machine learning libraries—notably TensorFlow and PyTorch—and it’s impossible to ignore this as the likely reason so many are moving to Python, and why Python may be overtaking Java in so many metrics. (O’Reilly online learning usage of Python is up 27%, while Java use is down 3%.)
Java isn’t likely to be knocked far off its block, thanks to its own robust libraries for collections, data structures, project management, and testing and its well-established and extensive ecosystem—a reminder that newer isn’t always easier.
C has seen a rise in popularity this year (up 12% in O’Reilly online learning usage), likely due to makers looking for projects to keep them busy on lockdown and exploring C for embedded systems. The pandemic has also increased the necessity for medical devices that use embedded software languages like C. As Marc Loy, author of Learning Java and the forthcoming Smaller C, notes:
I think we’re hearing more about C these days because more makers are encountering it for the first time as a language they want to use themselves. They’re searching for tutorials, reading histories, joining forums, and creating some really neat IoT projects on an ever expanding list of microcontrollers. This world lives for eking good performance out of limited resources, and C is perfect for that work.
The embedded trend is one we’ll watch closely as more people are allowed to leave their houses. And although issues of performance have been around much longer than the pandemic and won’t likely go away on the back of it, understanding design for embedded systems certainly hones understanding of performance.
It could be said that individual programming languages are starting to have similar features, just implemented in different ways. This isn’t to say that programming languages are becoming indistinguishable from each other but rather that emerging features often seem to follow similar trendlines, and trends in language choices follow trends in features.
Concurrency has driven several of these trends: Java is on its way, through Project Loom, to improving concurrency in-language, though it’s currently looking unlikely that it will be included in the September 2021 long-term support release of Java 17—so in the meantime, you might want to learn Kotlin. (Duncan McGregor, coauthor of Java to Kotlin, notes that “Java developers are productive in Kotlin really quickly—like it is meeting them half-way. Kotlin will help you adopt functional programming, but as a gradual process rather than a paradigm shift, and you can bring your existing Java along for the ride.”) Asynchronous programming was added to stable Rust at the end of 2019 as its own solution to concurrency. (Rust, incidentally, grew 94% in usage on O’Reilly online learning in 2020, the fastest-growing language on our platform.)
Other features are also driving interest in new languages: Go is in the process of adding generics which could potentially reduce the lines of code in a popular application such as Kubernetes by the thousands. Jon Bodner, author of Learning Go, suggests that those who already know languages such as C would have a great experience with Go:
Go is a great second language for C developers. They have similar philosophies: simple syntax, a stable standard library, thousands of third-party libraries, and native compilation. Go adds efficient garbage collection and built-in concurrency support. Soon, generics will increase expressive power with minimal additional complexity. Now is a great time to learn Go.
C++ (up 10% on O’Reilly online learning) is looking to have a banner year thanks to the release of C++20, the most significant release since C++11 and the first version that has been standardized. Two of the most important new features are modules—led by Richard Smith at Google, which makes your code safer and allows for much faster build times—and coroutines—a feature that makes asynchronous programming easier to implement.
A new multidimensional understanding of programming
Knowing multiple programming languages improves your ability to think critically and multidimensionally about software development. Each new language a developer learns brings them closer to understanding how to design better systems.
Java Champion and O’Reilly author and instructor Ben Evans advises Java developers looking for a second language to go anywhere that pushes your boundaries.
You should learn a language which changes and challenges your notions of programming as they have been formed by your experience with Java. A very different language to Java will teach you the most—learn Python to learn a simple dynamically typed language, Haskell to see how far you can take functional programming, Rust to turn your understanding of data ownership on its head, or C++ to understand why we needed to invent Rust in the first place—but learning any second language at all will teach you something.
This category includes another trend we’re keeping our eye on: low-code and no-code programming. We reached out to O’Reilly author and instructor Noah Gift for his take:
Many MBA programs as well as analytics-driven organisations are embracing no-code/low-code business intelligence, machine learning, and AI.…AI and ML are becoming like Excel, a tool readily available to solve modeling and business problems, but requiring little to no code.
The underlying benefit of low-code platforms is that they allow developers to spend less time writing code and more time thinking about what the code should actually do.
SEE ALSO: Integrating Python with Java
The one common trend here in learning any new language: advantage. Each new library, platform, device, perspective, or programming choice gained by adding a new language to your utility belt is a distinct advantage in the everyday life of the working programmer. Marc Loy puts it best, and it’s a statement that’s set to guide our own look ahead into 2021 and beyond:
The programming landscape is evolving quickly like so many areas of tech. I know that adaptation is survival. If you understand how good coding works in a variety of environments, you will have an easier time dealing with whatever comes next. And that “whatever” is probably here already, so you need every advantage you can get.