Why Rust?

Omar Faroque
Coding Rust
Published in
7 min readMay 17, 2020

--

Programming is hard.

Not because our hardware is complex, but simply because we’re all humans. Our attention span is limited, our memory is volatile — in other words, we tend to make mistakes.

Computers and software are everywhere: in space, in the air, on the ground, on and even in our bodies. Every day more and more systems are automated and more and more lives depend on software and its quality.

Avionics, self-driving cars, nuclear power plants, traffic control systems, implanted pacemakers. Bugs in such systems almost always endanger human life.

There is a huge difference between “program correctness was checked by tests” and “program correctness was logically proven”. Unfortunately, even if we have a test for every single line of our code, we still cannot be sure that it’s correct. However, having a formal system that would prove our code is correct (at least in some aspects) is another story.

The Rust way

Rust as a language is different. Not because of its fancy syntax or welcoming community, but because of the confidence one gains when writing a program in it. Rust’s very strict and pedantic compiler checks each and every variable you use and every memory address you reference. It may seem that it would prevent you from writing effective and expressive code, but surprisingly enough, it’s very much the reverse: writing an effective and idiomatic Rust program is actually easier than writing a potentially dangerous one. In the latter case, you’d be…

--

--