Which are the best new programming languages for software developers to learn?

If you're looking to learn a second language, these are the languages that complement your existing skills as a developer.

The best programming languages to learn in 2019: Top coding skills that pay you the most These are the languages that are in the highest demand and offer the highest salaries.

If you want to become more productive then consider learning a new programming language.

That's the advice of Noel Welsh, founding partner at consultancy Underscore, who argues it is one of the only ways for developers to scale up what they can achieve.

"Languages are a really powerful tool. I don't think we give them enough credit," he told the QCon 2019 conference in London.

His reasoning is that "the only way we're going to get productivity at scale is by not writing code", and that one of the best ways to cut the amount of unnecessary code written is learning a new language.

qcon-headshot.jpg

Noel Welsh, founding partner at consultancy Underscore.

Image: QCon / Underscore

While it's true that using software libraries offer a simple way to avoid writing code, this approach has limitations, he said. Every language has a broad selection of libraries that developers can drop into code, saving them from reinventing the wheel every time they want to carry out the same common task, such as Express framework for building web apps used with Node.js JavaScript.

However, using software libraries will only get developers so far, he argues, as those libraries will still be constrained by the underlying code they are written in.

In contrast, learning a new language offers greater scope to allow multiple operations to be combined into fewer commands and to abstract away complexity.

"Ultimately languages give us much more power than libraries because libraries are constrained by the host language," he said.

"If you write a library in C, for example, you always have to talk about memory managers, you can't get around that," he said, adding that some other higher-level languages will take care of the allocation and deallocation of memory automatically.

"It's something you can only achieve with a language, you can't achieve it with a library."

Of course, each positive feature offered by a language has to be weighed against the trade-offs in its design choices.

For example, in a high-level language like JavaScript the developer is reliant on the Just In Time compiler to decide whether a variable is a floating point number or an integer — as they can't specify variable type, or in Java, the Java Virtual Machine — the platform that Java code runs on —"doesn't allow you to explicitly talk about vectorizing code", he said.

SEE: Hiring kit: Python developer (Tech Pro Research)

But one of the biggest cost considerations when choosing a new language is its level of compatibility with the languages an individual or organization is already using.

"Another reason why languages get adopted is because they allow us to respect the legacy code we have, to continue to maintain our investment in legacy," he said.

"Respecting and maintaining legacy has been one of the driving forces of our industry."

With that legacy pressure in mind, Welsh listed his choices for alternative languages that work well with established languages and that existing developers should consider learning.

Scala for Java developers

Compatible with Java, thanks to running on the JVM, Scala boasts useful aspects of functional programming languages and was designed to be a concise and feature-rich alternative to Java.

Scala is often singled out as being associated with high paying developer roles, even if demand for it as a skill lags behind Java, and it is commonly used for big-data analytics.

"When Scala came out, we were still back in the Java 6 days and it was seen as a vastly superior way of accessing the JVM," said Welsh.

"If Scala came out now I'm not sure it would see the same adoption because Java has actually started innovating and changing."

Kotlin for Java developers on Android

Kotlin has been described by a Netflix senior software engineer as offering "some of the best features of other languages" combined with "interoperability with Java", due to its ability to run on the Java virtual machine (JVM).

The popularity of the open-source, statically-typed language received a big boost in 2017, when Google announced it was an officially supported language for building Android apps.

The language, was chosen as the second favorite language by developers in the Stack Overflow Developer Survey last year.

Apart from Android apps, Kotlin is also used to build backend and server-side applications.

If you're interested in learning more about Kotlin, check out TechRepublic's round-up of online resources.

Swift for Objective-C developers

Swift is Apple's successor to Objective-C for programming iOS and macOS devices.

The language offers a modern syntax that frees developers from conforming with the demands of the C language, while also being interoperable with Objective-C.

While being easy to learn, it is designed to match Objective-C for type safety, security, and performance.

Rust for C developers

Rust is designed to offer the fast performance of C and C++ but with safeguards to make it much harder for unexpected behavior to creep into software due to memory mismanagement.

Its popularity is starting to spread and today it is used to build software for the web, embedded computers, distributed services, and the command line.

"What we might see in Rust is it enables you to do everything you can in C — all those system calls — but in a much better way," said Welsh.

Check out TechRepublic's guide for online resources for learning Rust.

TypeScript for JavaScript developers

TypeScript is a superset of JavaScript, allowing developers to write vanilla JavaScript while adding new features to help them build larger and more complex programs.

The language adds support for static types and other features that make it easier to work with classes and modules, alongside offering simpler tools for verifying and checking the structure of the code.

TypeScript compiles to JavaScript, so can typically be used wherever the developer normally uses JavaScript, whether that be for a web app running in the browser or backend code in a Node.js environment.

Also see

By Nick Heath

Nick Heath is chief reporter for TechRepublic. He writes about the technology that IT decision makers need to know about, and the latest happenings in the European tech scene.