Best Programming Languages to Learn

The Best Programming Languages to Learn in 2021

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on reddit
Reddit

Choosing programming languages that best suit your ambitions for 2021 and beyond

In-demand programming languages shift often.

It is therefore important to consider which new programming language to learn when you have the opportunity to do so.

Hot programming languages are usually reflected by average salary where there is a legitimate demand in the industry, which can be a good indicator on which one you should choose to learn.

But the field of programming is vast – just about every industry uses software of some sort, from agriculture to genetics, sports to space exploration, construction to video game production.

What you should therefore also consider is what you are interested in engineering.

This article will be doing just that. It will shed some light on not only which are the best programming languages to learn for you in 2021, whether you are brand new to the field of programming or have mastered a particular language and wish to endeavour into a new one.

Contents

Learning Curve? No. Potential Use Cases? Yes

No matter what programming language you decide to learn, there will always be a learning curve.

Some languages have steeper learning curves than others (Rust will have a steeper learning curve than JavaScript, for example, due to the complexity of compilation rules and granular memory control of Rust).

But time and dedication are needed to master any language.

Avoid asking “which programming language is easiest to learn”, and gravitate towards asking “which programming language is best for me to learn right now”.

Here are some ways for you to answer that question:

  • Research what software is being developed with the programming language, taking note of software that interests you the most.
  • Relevancy in the 2021 market. You may have heard that Ruby is very easy to get started with and is great for web development, but is Ruby as relevant in 2021 as it was in 2006? (hint – no it is not).
  • Perhaps your interest lies in the type of language. Maybe you are now highly fluent with Python but now want to expand your understanding in systems level languages like C++. Or maybe even move away from object-oriented programming and adopt a new paradigm such as a scripting language or a functional language.
  • Of course, salary is an important factor, and this ties into the overall relevance and demand of the programming language.

Depending on how far up the software stack the language is, its features may vary drastically.

Let’s explore this concept of low to high level programming languages and the types of programming languages that exist at each of these conceptual layers.

The Low Level to High Level Programming Language: What it all Means

You often read terminology such as low level and high level when a programming language is being described.

These terms generally reflect how far up the software stack the language in question is applied to.

Now for a bit of computer science.

The following illustration outlines the various layers of an operating system and which programming languages you can expect to be working with for each of those layers.

Think now about where you want to be programming, or come back to this after you read the entire article to consider which language is best for you.

System Programming Stack

Low level: System resources and core OS processes

These days, low level refers to machine language or assembly language.

These languages are actually instruction sets at the rock bottom of the software stack that interact directly with the hardware.

Assembly or machine language are rarely written by hand, and are instead compiled from C and other compiled languages.

However, knowledge of instruction sets, especially for processors (Intel processors will have a different instruction set to ARM processors), could be a very sought after skill.

After all, someone needs to maintain compilers for the hardware.

The C programming language used to be considered low level, as it is used for the majority of operating system libraries that interact with a system’s kernel.

Furthermore, the layer above these system libraries, the cross-platform layer that abstracts over platform-specific system calls, is also written in C.

Concretely, C is still the dominant language for the operating system.

The emerging mid level language category

Without getting too technical about different types of system libraries, we can clearly see that they “connect” high level languages to the low level languages.

Because of this, C (and C++, and others that we will discuss further down) are more-so considered as mid level languages.

If we consider these definitions, this middle category of programming languages is now rather populated in 2021, encompassing what are termed system level languages. Go, Rust, Kotlin, C and C++ are all popular languages that fall into this category.

High level application layer

At the top of the stack lies a healthy ecosystem of application level programming languages, also known as high level languages.

JavaScript, TypeScript, Python, Java and Swift are all popular application level languages.

Are these definitions strictly set in stone? No – these “levels” of programming languages are only loosely defined, especially at the middle to high levels.

Python for example is an effective language at system level tasks.

But since Python is an interpreted language, as opposed to a compiled language, its performance will suffer when compared with the mid-level offerings which are dominantly interpreted languages.

Which programming languages are best at each of these levels?

This is the topic that the second half of this article will address. We will discuss the best prospective languages to learn both from the system level and application level.

The system level languages will be discussed firstly, followed by the application level languages.

The question we will attempt to answer is which language is best suited for your ambitions.

If you are unsure about where you should be, read through the entirety of our breakdown so you get a good idea of the use cases for each language.

Traits of systems vs application programming

As a general observation, there are certain traits that application level languages have that system level programming languages do not have, and vice-versa.

Here is a brief overview of those differences:

  • Application level programming often has a bigger focus on creativity and artistic interpretation, such as working with GUIs (Graphical User Interfaces) and other visual elements to a program such as transitioning, menu design, and application workflow. JavaScript frameworks and scripting languages that encompass the web (HTML, CSS, JSX, JSON, et al.) are great examples of design-focused languages that abstract away concerns such as memory management and data representation, allowing the programmer to focus on getting their app working as per their designs.

  • System level programming has a much larger emphasis on engineering integrity on a more granular level. Programs in this realm will more often than not be run as background processes and accessible from the terminal. Systems programming solutions are much less open to interpretation and strict code conventions are critical, especially for larger code bases. Your code will also be put under more scrutiny as there will be “upper levels” of applications relying on your program.

If this sounds like systems level programming is harder than application level programming, this may be a reflection on your own personal skill sets and ideals.

A highly trained systems programmer will feel more at home in their space, and vice-versa.

With that being said, let’s take a look at which system level programming languages should be on your radar.

The Best Systems Level Languages to Learn

We will now discuss the main contenders in the low to mid level programming language space.

Key languages statistics from the Stack Overflow 2020 Developer Survey will be covered at the top, alongside key build / dependency tools for the language.

This is followed by a discussion on where the language is currently at, and strengths and weaknesses of the language will be summarised thereafter.

This structure should give you a strong intuition on whether the language is relevant for you!

Let’s get started.

Java

Java

Popularity rank: 5

Most loved rank: 17

Average salary (annual): $50k global / $120k US

Dependency management: Maven

Java maintains its position as one of the most widely used programming languages in 2021, and is heavily relied upon in enterprise applications, or applications used by large corporations that perform mission critical tasks.

In a world where open source is progressively seen as being the norm for modern software efforts, the community continues to support OpenJDK, an open-source development kit that was first made available in 2006.

Java is regularly maintained with major versions released every 6 months.

The latest version at the time of writing is 16, released on 16th March 2021.

Following the latest versions of the language will undoubtedly keep you at the forefront of Java development, but it is unlikely that large codebases will migrate to the latest version until a long-term supported (LTS) version is released – the next being 17.0, the next major release billed for around September 2021.

In fact, the most recent LTS version is Java 11, released in September 2018.

LTS versions ensure that critical bugs and discoveries in security flaws get fixed for 8 years – it is therefore much more likely to be working with such versions.

With a new major LTS version being released later this year, now is a great time to catch up with enhancements from version 11 – 17, (and perhaps even as far as version 8 that a lot of codebases still use).

You then have the cutting edge tools at your disposal that raises your career prospects in updating existing code bases to be more efficient and relevant.

Strengths of Java

  • An ecosystem that boasts powerful development tools with multi-platform support, and a huge existing library of tutorials, documentation and community discussion.
  • Demand for the Java software developer remains high, equating to a healthy market for job opportunities.
  • Open source, making it possible to learn the inner workings and contribute to the language development.

Weaknesses of Java

  • Application response times remain the biggest issue of Java from a usability perspective, along with high CPU usage.
  • Memory leaks are a common issue with Java applications which other languages such as Rust have solved.
  • Performance in general is not on par with C suite of languages, Rust and Go, of which could erode Java’s dominance in the enterprise software space over time.
Kotlin

Kotlin

Popularity rank: 4

Most loved rank: 17

Average salary (annual): $54k global / $130k US

Build tool: Gradle

Kotlin is a new programming language that is closely coupled to Java.

Version 1.0 was released in February 2016, but the language has been rapidly adopted particularly for Android mobile development. T

here are two main reason for this surge in Kotlin adoption:

  • Kotlin was designed to be safer and more concise than Java code. Safety features such as illegal use of null for standard types, safe calling with “?” syntax (similar to JavaScript), and compulsory error handling make Kotlin a much safer alternative to Java.
  • Kotlin is interoperable with Java files in Android development. A project could be gradually migrated from Java to Kotlin.

So why is Java still being used for Android development if Kotlin is a superior solution?

Well, Kotlin is still a new programming language and the ecosystem is still in its early stages.

Java documentation and tutorials still dominate that of Kotlin, so newcomers to Android development ( Android is the flagship use case of Kotlin) may opt for Java instead.

It is also worth mentioning that parallel processing is very well supported in Kotlin with its coroutine support.

Coroutines make it rather trivial to code multi-threaded applications. In a world where the majority of devices are running on many processing cores, demand for more optimised applications has never been higher.

Strengths of Kotlin

  • Compiles with existing Java code and is interoperable with Java.
  • Much easier to maintain than Java. Some estimates boast a 40% reduction in code compared to a Java implementation.
  • Kotlin has quickly established itself as the standard language for Android app development..
  • Already has strong IDE support, and is fully integrated into Android Studio.

Weaknesses of Kotlin

  • Still a relatively new programming language, and as a result lacks the documentation, tutorials, community knowledge and experience that longer-standing competitors take for granted.

Scala

Popularity rank: 22

Most loved rank: 14

Average salary (annual): $76k global / $150k US

Build tools / dependency management: SBT (Scala Build Tool) / library dependencies.

This article has thus far billed Kotlin as a viable alternative to Java, and that is perhaps true especially in the case of Android development.

But the story does not stop here – Scala is another programming language seen to both compliment and replace Java in some respects.

Like Kotlin, Scala is fully interoperable with Java, giving developers the ability to call Java code in Scala and vice-versa.

Scala also comes with other benefits that mimic those of Kotlin, including much less boilerplate code that results in less maintenance and debugging.

But whereas the two former languages are solely object oriented, Scala also a functional programming (FP) paradigm, whereby the entire application is constructed by composing and calling functions.

The arguments for functional programming include better modularity and therefore more simplistic code resulting in an easier debugging process.

The functional programming paradigm is a huge subject in and of itself, and Scala makes for a relevant, fresh and modern programming language to learn and adopt if you wish to delve more into functional programming.

Scala

Strengths of Scala

  • The most highly paid programming language in the US and number 2 globally – the paycheque that comes with Scala programming jobs cannot be ignored.
  • Scala is very expressive and excels as tasks like string comparisons, pattern matching and mixins. If you are not aware of these features, Scala will be a relevant language to familiarise yourself with such expressions.
  • Scala is compiled into Java Byte Code which is executed by the JVM, and is fully interoperable with Java code.

Weaknesses of Scala

  • Being a hybrid of object oriented and functional programming, Scala code can be hard to understand if it is not well documented or designed. Scala programming therefore requires the software developer to be trained in both paradigms, which introduces a steeper learning curve.
  • Because Scala runs on the JVM, it is subject to the limitations of the Java runtime, namely its performance and memory resource requirements. We can also derive from this that the use cases of Scala are limited to those of Java.
C# Sharp

C#

Popularity rank: 4

Most loved rank: 8

Average salary (annual): $57k global / $110k US

Package manager: NuGet

C# is viewed as a strong competitor to Java, albeit with less market share.

It is a popular general purpose programming language that has strong multi platform support, but lacks direct access to the operating system that C and C++ excel at.

Like Java, C# is used to create desktop applications for Windows and Linux, as well as applications that run on the server in the web service space.

The other major adoption of C# is in video games development with the Unity game engine where C# is the primary language of the platform.

C# was created by Microsoft (version 1.0 being released in 2002) within the .NET initiative, and consequently relies on the .NET framework and runtime environment.

The version of C# you will use in development will depend on the target framework, with releases ranging from 7.3 to 9.0. The latest release is 9.0.

C# is open source and there are other implementations away from Microsoft’s. .NET will most likely be used in corporate development settings, however.

Is this reliance on .NET a good or bad thing for C#? There is undoubtedly a lot of bootstrapping to run C#, and performance will not be as fast as C++, C, Go or Rust.

In fact, the C# compiler actually compiles C# into an IL (Intermediate Language), which is then compiled JIT (just-in-time) into the native assembly language as it is needed.

But this setup also comes with its own advantages.

Application sizes are typically reduced dramatically compared to C#’s main rival Java.

The developer need not worry so much about resource management due to C#’s garbage collection and type safety – safeguards that C and C++ lack.

And the language syntax is quite straightforward and intuitive, making it a friendly language for beginners, not dissimilar to the entry-language role of Python.

Strengths of C#

  • A general purpose, object-oriented language that is easy to learn and read.
  • Regularly updated by Microsoft with good documentation at every new release.
  • A rich standard library makes your work as a developer easier.
  • The most capable language for game development when used with the Unity game engine.
  • A capable general purpose software development language.

Weaknesses of C#

  • Requirement of the .NET framework and runtime, effectively tying you into Microsoft’s ecosystem for updates and maintenance.
  • Does not interact directly with hardware and firmware, resulting in more reliance on lower level languages.
Rust

Rust

Popularity rank: 19

Most loved rank: 1

Average salary (annual): $74k global / $130k US

Package manager: Cargo and Crates

Introduced in 2010, Rust is another relatively new programming language.

The engineering team at Mozilla learned from the weaknesses of former languages (C++, Java, etc) that stem mostly from memory safety issues and performance, and built a new programming language from the ground up.

Memory leaks are the primary cause of bugs and fixing such an issue is not trivial.

Rust has not only managed to bake memory safety directly into the compiler, it has also maintained the speed and efficiency that is expected from a low to mid level language.

This is why Rust was ranked the most loved language in the Stack Overflow Annual Developer Survey.

Although the initial learning curve of Rust can be steeper than other languages we have discussed, the advantages are clear: less debugging and maintenance updates and low runtime resource requirements.

A large number of corporations, including Microsoft, Dropbox, Coursera, NPM and others, rely on Rust in some part of their software stack – and this trend will very likely continue as the language and ecosystem evolve.

The cloud ecosystem of today has evolved into a conglomeration of microservices.

This has made it rather trivial to be able to replace a particular process with another implementation without causing breakages to other services.

The microservice trend has played well with Rust, giving developers the opportunity to introduce safer, more efficient Rust-compiled processes to their production systems.

Strengths of Rust

  • Memory safe code by default (there is an option to write unsafe code in C if one has to). Memory safety was a long-standing problem in the programming world before Rust. Companies still invest heavily in debugging tools, testing suites and raw manpower to circumvent memory leaks in their software. This is the expensive problem Rust aims to resolve.
  • The Cargo CLI is a great tool for managing projects, project dependencies, testing and the compilation process for Rust applications.
  • Rust is regularly updated with latest stable releases, but also has nightly build support for developers who wish to test cutting-edge or otherwise experimental features of the language.
  • Excellent documentation.

Weaknesses of Rust

  • A steep initial learning curve. Rust’s obsession with memory safe code results in a reliance on advanced features such as smart pointers, granular control of the stack and heap, and scope, raising the difficulty level of Rust. The Rust compiler is very smart however, and will aid the developer with every change made to their source code.
  • Compile time can be slow and result in large binaries for larger codebases.
  • Unfamiliar syntax that developers need to understand even at the basic level. This ties into the first weakness of a steep learning curve, making Rust not easy to learn.

The Best Application Level Languages to Learn

Now let’s take a look at the higher level languages that will be relevant this year.

JavaScript

JavaScript

Popularity rank: 1 (the most popular!)

Most loved rank: 10

Average salary (annual): $53k global / $112k US

Package managers: NPM / Yarn

JavaScript is now the most widely used programming language at the application level.

This is partly because of its dominance in the web development and server space, but also because of the ecosystem around the NPM package manager.

If you are in a full stack development role, the chances are JavaScript will be in that stack.

“Full stack developer” is popular terminology for companies looking for developers who are trained in their full technology stack. Being full stack is a strong sought-after skill.

What is interesting is that JavaScript is increasingly acting as a compiled language.

Yes, it is an interpreted language at its core, but libraries, frameworks and build tools have flourished in recent years that have dramatically improved the development pipeline.

Front end libraries (Vue, React, etc) rely on build tools such as Babel, that allow these frameworks to adopt JavaScript features that are not yet widely supported in browsers or the Node.js runtime environment.

This compilation component has allowed the growth and prominence of new extensions, notably the JSX extension, a syntax extension that React introduced and heavily relies upon today.

Also, tools like Webpack build your JavaScript project into a small optimised bundle.

At its core, Webpack bundles your CSS and compiled JavaScript is minimised and combined into chunks of code in less files.

Like Babel, Webpack also supports plugins that have allowed the developer community to build tailor-made compilation processes for their projects.

JavaScript is the language of web development, both on the front end and back.

Node.js is a fast and efficient runtime environment that is well-suited for web servers and server-side processes.

Build tools can now compile your HTML and CSS code into optimised web pages using sophisticated libraries, and the public NPM registry is thriving.

Strengths of JavaScript

  • Lightweight, fast optimised client-side applications for web development.
  • Relatively easy to learn – and is among the most popular programming languages to learn.
  • Evolving multi platform support. JavaScript is now used to compile code to mobile devices (iOS and Android apps with React Native) in the realm of mobile app development, desktop applications for Windows and the Mac, as well as for the server side and client side web development.

Weaknesses of JavaScript

  • Browser support is a constant consideration for build tools in order to maintain cross-browser compatibility. This issue has become less severe as browser support considerations have receded to the compilation stage, but ECMAScript standards are rolled at different times for different browsers. Chrome and Safari tend to support newer ECMAScript standards quicker than other browsers.
  • When compared to binary-compiled (or Web Assembly compiled for the web) languages, JavaScript has a disadvantage in efficiency. Even though Node.js is a fast runtime environment relative to server side siblings such as PHP or Python, C++ and Rust implementations of a JavaScript process will undoubtedly yield better performance.
TypeScript

TypeScript

Popularity rank: 9

Most loved rank: 2 (the most loved at the application level)

Average salary (annual): $57k global / $120k US

Package managers: NPM / Yarn

JavaScript super-set TypeScript has gained significant adoption in recent years.

TypeScript is a typed language that builds on top of JavaScript, and also introduces advanced features such as decorators, enhanced class support, a wider array of keywords and syntax patterns, and more.

TypeScript was introduced by Microsoft and is now in its 4th major version.

TypeScript is seen as a superior development solution than plain JavaScript; it makes JavaScript code less ambiguous and easier to read.

It cuts down on bugs with its strict typing, and aids in developing in large teams.

TypeScript is well worth learning if you are also considering JavaScript as your next language to learn.

TypeScript also compiles to WebAssembly via the AssemblyScript project, another up-and-coming technology for compiled web applications.

The community consensus at this time is that WebAssembly will coincide with JavaScript and complement it, rather than replace it altogether.

Strengths of TypeScript

  • Brings type safety and more order to JavaScript code that is valuable in team efforts and open source web development projects.
  • Great IDE support.
  • Regular new features push the boundaries of JavaScript development by introducing new features before ECMAScript makes them standard.

Weaknesses of TypeScript

  • Complex types can be verbose and hard to read or maintain.
  • Adds more complexity to the development environment that design oriented projects such as web page design will not benefit from.
  • Not all APIs and libraries are TypeScript supported. Even though your project may be fully typed, external services or libraries you rely on may not be. This could give your app a false sense of security.
Python

Python

Popularity rank: 4

Most loved rank: 3

Average salary (annual): 59k global / $120k US

Package managers: Pip, Conda.

Python is arguably in its strongest position since its inception given its popularity amongst the developer community in addition to an increasing rate of adoption.

Data science, machine learning applications and AI, server side web development and blockchain applications are all applications of Python developers.

The latest version at the time of writing is version 3.9.0 released in October 2020 with a 5 year support window.

If you are planning to learn Python in 2021, you will be learning at least Python version 3.5.

Learning version 3 has not always been the case due to the major breaking changes that version 3 introduced from version 2.7.

This caused a lag in the adoption of version 3 way back in 2008, and you may see debate online regarding the issue.

Python code that follows the strict style guide is referred to as “Pythonic” code, something you will often hear of discussion forums.

The art of writing Python code is indeed taken seriously in the community, but Python is also seen as a beginner friendly programming language to learn due to the lightweight nature of the syntax.

Because Python code is interpreted at runtime and not compiled, the developer does not need to consider compiling Python code to see the results of their work in action.

Getting started with Python also requires no command line experience, or IDE experience for that matter, because tools like Jupyter Notebook allow programmers to write Python code snippets directly in a notebook style GUI – and this works very well for the data science use case.

Strengths of Python

  • Python is relatively easy to read and write, and easy to learn. The syntax attempts to resemble English as much as possible, resulting in Python being beginner friendly.
  • Multi-platform support for all major operating systems, with tools such as Virtualenv to streamline setting up an isolated Python environment with a particular version. This makes for great support for web development, with popular web application framework Flask or Django being the go-to solutions for many web developers.
  • Machine learning / deep learning applications are primarily developed with Python for software engineers, with strong tooling for prototyping and statistical analysis of applications.
  • The Pip package manager is a great tool with a huge collection of libraries and packages that various fields rely on.

Weaknesses of Python

  • A slow runtime. Various Python packages such as NumPy have circumvented this issue by compiling their library with C and C++, and providing a Python interface on top of that code.
  • Python is dynamically typed, which means the runtime interprets the types on the fly as the program is being executed. This is a cause for runtime errors in flawed program designs.
  • Python’s database access layers are underdeveloped compared to more widely used technologies like JDBC (Java DataBase Connectivity) and ODBC (Open DataBase Connectivity), resulting in Python lagging behind in large-scale enterprise scale applications.
Swift

Swift

Popularity rank: 17

Most loved rank: 9

Average salary (annual): $58k global / $125k US

Package managers: CocoaPods, Swift Package Manager, Carthage.

The Apple ecosystem cannot be ignored when considering the best programming language to learn for you.

With iOS now having over 2 billion active devices, and macOS transitioning to Apple Silicon, Swift has never been in a stronger position in terms of demand.

Even though the Swift ecosystem is relatively closed compared to the other popular programming languages we have covered, job prospects are still quite strong, especially in the US.

The takeaway here is simple – if you would like to create applications for Apple’s ecosystem, Swift is the one to learn.

Summary

We have now presented various types of programming languages to learn, as well as what we believe will be the most relevant contenders for this year.

Which programming language you choose to learn next will depend on your interests and goals, but your choices will need to align with industry trends and overall demand in a particular technology.

Do you see yourself as a front end or a system level engineer?

Someone who focuses on interaction with the operating system right down to the hardware, or the end user experience of an application?

Are your interests research based in machine learning or more geared towards game development?

Whatever your goals are, this article hopefully acted as a good foundation to the direction of your personal best programming language to learn next.

Back to article listing

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on reddit
Reddit
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on reddit
Reddit