What’s the hottest programming language for software development today? That’s debatable, of course, but I think that Rust might take the title. Whenever I hear developers talking about the best programming languages available, it's usually part of the conversation. True, Rust ranks only in 33rd place on the TIOBE Index of top programming languages. But it does feature on lists of the “most loved” languages and the best programming languages to learn, receiving accolades for “changing the way we think about programming.”
This begs the questions: Why are folks so excited about Rust? Is it really unique, or is it just over-hyped?
Development on Rust began in the mid-2000s. However, it wasn’t until 2015 that the first stable release of the language debuted. And it has only been in the past couple of years that the language has become a hot topic among developers.
The first time you glance at Rust code, you might think you’re looking at a C or C++ program. Syntactically, the language is very similar to these languages. And it is a compiled language, which also makes it familiar to developers used to working with C or C++.
But those features aren’t enough to explain the buzz. For that, you have to look at the ways in which Rust is different from C, C++ and other popular languages.
Probably the biggest selling point of Rust is that it is designed to mitigate security vulnerabilities within applications. It does this primarily by disallowing programmers from writing the sorts of code that tend to lead to memory-related vulnerabilities, such as null pointers and dangling pointers.
Thus, when people say that Rust is a more secure programming language, it’s not because it magically prevents exploits from being executed. The language's security benefits really just boil down to design features that make it harder for developers to write insecure code in the first place.
It’s easy to see why developers would celebrate the security benefits of the language in today’s world, where every programmer dreads being the author of the software behind the next big data breach.
Another feature that sets Rust apart from languages like C and C++ is that it has built-in support for concurrency. Concurrency, which lets different parts of a program execute simultaneously, has become especially important in modern application environments that take advantage of microservices architectures to build applications that consist of multiple small services.
Other popular modern languages, like Go and C#, also support concurrency. Rust isn’t especially unique in this respect. But it does give the language an advantage over other languages that are comparable in syntax.
Easy Setup for Rust Environments
Perhaps another feature driving Rust’s popularity is the fact that it’s pretty fast and easy to set up a Rust development environment and start programming. You can use rustup to get an environment up and running with one simple download.
Plus, setup is virtually the same whether you are using Windows, Linux or MacOS. This makes Rust different from languages like C and Java, where environment setup is more dependent on the operating system platform that you use.
Modernizing C and C++
From the perspective of the features listed above, Rust is essentially a modern version of C and C++. It uses similar syntax to these languages.
However, Rust enforces more secure coding practices, offers concurrency support and is easier to set up, no matter which operating system you use. These are all features that are especially attractive to developers in today’s world, where security, microservices and platform-agnosticism are priorities.
At the moment, the mindshare surrounding Rust is probably much greater than the share of real-world applications that are actually written in it. While there are a fair number of Rust programs out there, most of us have heard of only a few. Rust has a long way to go to become widely used for everyday application development, much less things like operating system programming.
Still, it’s undeniable that Rust has a lot of enthusiastic supporters within the development community. Mozilla, which was the first investor in the language, is also aggressively promoting the language. While it’s possible that Rust will turn out to be a fad, my money is on it becoming an increasingly important language for developing secure, distributed applications over the next decade.