A racing bike with training wheels (3/5)
This is part 3 of 5 of our series "Why we love Rust". Check out the complete series here
Can you tell us about your introduction to Rust?
Coming from a high-level language background, I wanted to properly learn a systems language. Preferably a language without a layer of “magic” to obscure stuff I’m not allowed to worry about. At first, I started learning C, which got me quite far, but I was never confident enough about actually understanding the underlying concepts well enough to write robust code and being productive at it. Along came Rust. It is actively forbidding me to make mistakes that in C or Java would have led to pesky runtime errors. It also explains politely why and it does it all at compile time.
Are you working on Rust projects at Tweede golf right now?
As a pet project, I’m building a “self-driving car” (it’s actually more like a bumper car), using an STM32F3 Discovery board. It’s my very first introduction to embedded programming. It’s really cool how Rust’s ownership system can prevent you from frying your components. It’s also an absolute joy to work on a new subject with expert-level co-workers.
When I replaced a data-wrangling microservice written in Java with Rust, it outperformed it in every aspect. The base memory footprint was tiny, CPU speeds blazingly fast and start-up time became instant.
What about private projects?
I’m trying to create a 2D platformer game in Rust, using as few external libraries as possible inspired by Handmade Hero. It’s not meant to be ever finished, it’s more like a perpetual learning project. I started out in C, which taught me a great deal about pointers and memory management, but I kept getting stuck on errors that I couldn’t solve because I didn’t understand the underlying concepts thoroughly. With Rust, I can just try to “please the compiler”, make it run, and come back later to actually try to understand those concepts when I feel like I’m ready for it. The longer I’m programming in Rust, the more I’m naturally avoiding these bad concepts.
What about the steep learning curve?
Rust is a system language and has a more steep learning curve by nature than, say, TypeScript. Even so, Rust feels like it does anything in its power to flatten that curve. The installation process with rustup for example is an absolute breeze and gets you up and running in a matter of minutes. Cargo takes care of your dependencies, generates docs, manages builds, performs benchmarks, tests, and many more. All configured in a single TOML file. So, steep? Yes, but doable. The feeling is like learning how to ride a bike. Fearlessly starting on a pro racing bike straight away, with Rust's compiler acting as training wheels keeping me from tumbling over.
Where will Rust be in 5 years?
I’m quite optimistic about Rust’s future. Languages come and go, but seeing the big corporates like Microsoft, Amazon, and Facebook starting to adopt Rust tells me it’s here to stay. I think it has the potential to take over some industries as the de facto standard language. I’ve never been so excited about a programming language before and I really hope it’s love will continue for 5 more years to come!