9 advantages of programming in Rust

So, Edward Snowden has endorsed the Rust programming language. Google, Microsoft, AWS, Mozilla, Facebook and many other companies are funding its development. Why? I can’t say for sure, but here are a few of the reasons that I like the language so much that I wrote a book about it:

Safety for your users

Programming in Rust provides safety guarantees that are not available to programing languages that have safety features bolted on. And unlike languages that provide an equivalent level of safety, Rust is unique in that it does not impose runtime costs.

Cheaper running costs

Other things being equal, the application that uses less memory is cheaper to run. You can run more applications on fewer compute nodes, or you can run your application within a smaller compute instance. An application that can easily scale to serve the next 1,000 users means you’ll spend less money on development also.

Faster debugging

The Rust compiler is a coach, not simply a pedantic critic. Your experience with the helpfulness of Rust’s compiler output will make you frustrated with what you encounter from other error messages.

Speed that’s available to ordinary programmers

Most programmers are not 10x programmers. Because of its safety safeguards, Rust programmers who do not consider themselves expert are free more willing to experiment — free from the fear that they have introduced security holes or stability issues.

Multi-disciplinary community

Rust is almost no one’s first programming language. Nor are there many Rust programmers who code exclusively in Rust. Instead, its community is drawn from programmers from many fields. This means that the Rust ecosystem benefits from many ideas that have been incubated and refined, where-ever they first popped up.

Wide applicability

Rust is labelled as a “systems programming language”, but don’t allow that to cloud your thinking. Many domains are well suited for Rust development. To draw an analogy, Rust has high dynamic range.

Thoughtful abstractions

Rust’s design process is highly collaborative. It takes years for an idea to become a stable Rust feature, partially because there are often multiple iterations of thoughtful design.

Easy packaging and code-reuse

Incorporating third-party libraries into your project involves adding a single line to a metadata file. No fighting with multiple interpreter versions, incompatible dependencies, strange linker problems, or an arcane module system.

An empowerment mindset

The Rust community’s overarching goal is to empower. As you take the time to learn Rust and become productive with it, you’ll find yourself believing in yourself.

Tim McNamara is the author of Rust in Action. He is active on Twitter and hosts tutorials on YouTube.

21