8.2 C
New York
Friday, December 3, 2021
HomeTechnology3 reasons why you should learn Rust in 2021 - and maybe...

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

The unofficial Rust mascot is a crab named Ferris. (Photo: Alisa Ch / Shutterstock)

Rust applies as complex and as 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 many so-called higher level programming languages, Rust has neither garbage collection nor a virtual machine. 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 makes many developers shy away from delving into Rust. We provide three reasons to show that, despite the complexity, Rust has goodies that will make your work with the language sweeter.

The package manager

Rust is one of the few programming languages ​​that has an integrated Have package managers. The Package Manager is called Cargo and is valued by developers because of its comparatively simple usability. With TOML he uses an easily understandable syntax that can be learned quickly due to its precise semantics.



In Rust, unlike in JavaScript, for example, developers do not have 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 either.

The fact that you don’t need build scripts does not mean that they are not 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 available, 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, he'll tell you what causes the error and where to 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, it suggests at least one command - rust --explain {error code] , which 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 in view of 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 that, 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 probably one of the main reasons for the increasing interest in the programming language, which has been supported by Mozilla for some time.

First In October 2020, 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 and in using it in the future for its own products. According to a blog post by the in-house security team from 2019, around 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 the Storage security. "If the programs were written in Rust, these problems would probably not arise," the authors of the blog had already concluded at the time.

Most read

Follow World Weekly News on

Derrick Santistevan
Derrick is the Researcher at World Weekly News. He tries to find the latest things going around in our world and share it with our readers.

Leave a Reply

Must Read