Atamai

Why Rust Is Fun to Write (and How It Makes You Better)

rust_is_fun

I mostly work with backend systems and before picking up Rust I have spent 20+ years writing C#. So when people told me Rust was strict but I didn’t think much of it. I figured it would just be another language with a few extra rules.

Turns out they weren’t kidding.

My first days with Rust were a lot of writing code -> hitting compile -> immediately being told I couldn’t do what I just did. Ownership here, borrowing there, lifetimes popping up in places I wasn’t used to seeing them. It felt like the Rust constantly interrupted me.

After a while I realized Rust wasn’t trying to make things harder for me but it was forcing me to be clearer about what I was building.

And once that clicked it actually became pretty fun.

The compiler is strict but in a helpful way

In C# you can usually get something working quickly and trust the runtime to handle a lot of things for you. Memory is managed, null references can slip through sometimes, and concurrency issues often don’t show up until later.

Rust doesn’t really allow an “I’ll fix it later” approach.

The compiler wants you to be explicit about how data moves through your program. Who owns it. Who borrows it. What happens if something goes wrong.

Feels slow when getting started but what surprised me was how often the compiler caught things that would have turned into real bugs later on.

Instead of shipping something that sort of worked I was being pushed to tighten up the design right away. By the time the code finally compiled it felt cleaner and more solid.

Ownership changes how you design things

Ownership is the big concept everyone talks about and it really does (IMO) change how you write code.

In C# it’s easy to pass references around between layers and rely on garbage collection to clean things up later. You don’t always think too hard about who really owns a piece of data.

Rust forces you to think about that.

At first it feels like extra work, but pretty quickly you notice that your services and internal APIs become clearer. Instead of everything being shared everywhere responsibilities are more obvious.

You stop having random shared state just because it’s convenient.

The code ends up being easier to follow and easier to trust.

Error handling becomes part of the flow

Rust also doesn’t let you ignore failure.

With Result and Option everywhere you’re constantly dealing with the fact that things can go wrong. You either handle it or pass it along explicitly.

For backend systems this is actually great.

You start thinking about errors as a normal part of the program instead of something exceptional that probably won’t happen. The code gets a little more verbose, sure, but it also becomes a lot more predictable.

And when something does go wrong in production it’s usually easier to trace.

Concurrency feels less scary

At some point in backend work you always run into concurrency.

In other ecosystems I’ve written multithreaded code that looked fine and then behaved in weird ways under load. The kind of bugs that disappear when you add logging.

Rust doesn’t eliminate every possible issue but it prevents a whole class of common mistakes.

Because of ownership and the type system you can’t accidentally share mutable state between threads without being very explicit about it.

Instead of hoping you got the locking right you can reason about what’s even allowed in the first place.

That alone makes working with concurrency feel much scary.

The biggest thing Rust changed for me

The main thing Rust did was make me think about memory and ownership.

Even when I go back to C# now I pay more attention to allocations, lifetimes and how data is shared. I’m more aware of what’s happening under the hood.

Rust didn’t just improve my Rust code. It made me more thoughtful in other languages too.
Rust isn’t fun because it’s easy, it’s fun because it makes you think.