3 reasons why you should learn Rust in 2021 – and maybe even have fun doing it

No time right now?

Rust is considered complex and a programming language with a steep learning curve. That’s one side of the medal. We mention three points that Rust has ahead of other programming languages ​​in terms of usability.

Rust is a modern programming language that focuses on thread safety and performance. Unlike in many so-called higher level programming languages, there is neither garbage collection nor a virtual machine in Rust. Instead, Rust addresses known problems of long-established low-level programming languages ​​such as C or C ++. At the same time, the programming language is known for its steep learning curve, which causes many developers to shy away from delving into Rust. We provide three reasons to show that Rust, despite its complexity, has goodies that will make your work with the language sweeter.

The package manager

Rust is one of the few programming languages ​​that has a built-in package manager. The Package Manager is called Cargo and is valued by developers due to its comparatively simple usability. With TOML, he uses an easily understandable syntax that can be learned quickly thanks to its precise semantics.

name = "project"
version = "2.0"
authors = ["t3n"]

image = "0.23.5"

In Rust, unlike in JavaScript, for example, developers do not need to set up build scripts; the package manager automatically compiles and links libraries and programs. Production and development builds do not have to be configured in Rust, and Rust developers do not have to worry about platform compatibility.

Almost finished!

Please click on the link in the confirmation email to complete your registration.

Would you like more information about the newsletter? Find out more now

The fact that you don’t need build scripts doesn’t mean that they aren’t possible. Build scripts are used, for example, when linking to C or C ++ libraries and can be customized where necessary. Cargo has integrated unit and integration testing. In contrast to other languages, in which developers often have a large number of testing suites at their disposal, which themselves have to be learned, this is a great advantage.

The compiler

The Rust compiler looks very well thought out and has a lot of features that other compilers lack. On the one hand, the output is color-coded, which contributes significantly to its readability. The error output is very detailed – the compiler provides a lot of context, which should make it easier for developers to find the cause. More often than not, it tells you what causes the error and where you can find the cause – by highlighting the code in question directly in the terminal, accompanied by further explanations. In many cases it even provides a fix for the error. If that is not possible, he suggests at least one command – rust --explain {error-code] that you can use to display further explanations. Unlike in other languages, this command doesn’t just show you a URL, instead the documentation is called up directly within the terminal.

In general: the programming language design

Rust is a young programming language and was designed with today’s requirements in mind – a luxury that many other programming languages ​​lack. One reason why older languages ​​such as C or C ++ are so complex is that modern features have been re-implemented in both over the years, while support for legacy code has been retained. There is no such legacy in Rust. Rust has methods like map(), filter() and find() and Clojures in Rust are more reminiscent of the callback workflow in JavaScript than the one in C ++. The fact that the programming language has these features is all the more impressive given the fact that it can still achieve the performance of C or C ++.

Rust’s safety-first approach makes life difficult for learners, but ultimately there is only positive to be gained from it, and yes, also with regard to the developer experience: Rust forces programmers to deal intensively with memory usage. This contributes to Rust having a steep learning curve, but it also means that programs written in Rust are very safe and less prone to errors, which ultimately means less debugging for you. Rust’s memory security is likely to be one of the main reasons for the growing interest in the programming language that Mozilla has supported for some time.

It was only in October 2020 that AWS invested heavily in Rust. According to the latest reports, Microsoft is also showing great interest in Rust, both in terms of contributing to the further development of the language, as well as in using it in the future for its own products. According to a blog post from the in-house security team from 2019 About 70 percent of security problems that the Microsoft Security Response Team assigns a CVE number – the acronym stands for Common Vulnerabilities and Exposures – are directly related to storage security. “If the programs were written in Rust, these problems would probably not arise,” the blog’s authors concluded at the time.

Most read

Leave a Reply

Your email address will not be published. Required fields are marked *