vulpine solutions

rust is good, just not for me

Rust is the big new1 thing in just about every programming niche. web frameworks? of course there’s a Rust one! in fact, there’s dozens of them. command line tools? good luck finding one that isn’t written in Rust these days. databases? oops, all Rust!

all of this carcinisation2 has me feeling kind of left out, though. you see, i’ve never really vibed with Rust: i have tried it multiple times, even building a handful of (unfinished, naturally) projects with it, but i always bounce off of it eventually. for a long time, i attributed this to Rust just not being what it’s hyped up to be, that it’s actually a lot worse than everyone says it is, but… it really isn’t. it is a good programming language. a great one, in fact! i want to dig a little deeper into why i, personally, don’t vibe with it. (not very deep, mind you, because self-reflection is difficult as hell)

it’s too low-level

starting off with the big one: Rust is a systems language. while it also works very well for web development, command line tools, and other software, it’s not what it was designed for. it was designed for scenarios where you can (and often need to!) squeeze as much performance as possible out of a system, where a garbage collector on its own would already not fit into the device’s memory, and where a string taking up any more space than its literal bytes is unacceptable.

meanwhile, when i used Rust, i just wrapped everything in an Arc<RwMutex<T>>3 and called it a day, because i don’t care about performance all that much. HTTP and database latency already destroy any optimization i could do to the business logic, so why even bother?

i was constantly fighting the compiler

i’ll admit it: i didn’t really go out of my way to learn Rust. like every other language i’ve used, i just jumped in headfirst and started trying to rewrite my silly little programs into the silly little crab language. this was a mistake.

Rust’s compiler is its strongest suit: it catches bugs that no C or C++ compilers can even imagine exist, and its borrow checker seems like dark magic at times. but what makes the compiler great for experienced Rust users makes it an absolute pain for people learning the language. other languages let you throw code at the wall and see what sticks; Rust won’t even let your code compile unless it works perfectly. this makes my learning process a lot more difficult, and as such, i never really learned more advanced Rust.

macros are magic, but not the good kind

macros are extremely powerful. many of the libraries i was using heavily relied on them–some, like sqlx (no relation to sqlx, the Go library4) are entirely built around them. they’re also a nightmare to reason with as an inexperienced rustacean.

i’m used to being able to ctrl-click on a function invocation to go directly to its implementation in other languages–Go, C#, and even Python all do this (well, as long as the Python package has type annotations, and you’re not relying on external ones). this just doesn’t work with macros, because the code is generated at compile time. it felt like i was feeding input into a black box and praying that whatever came out on the other side worked5.

types for days

somewhat related to macros: some libraries like axum generate ridiculously long type names, which, while funny, are impossible to actually parse. this didn’t make debugging my code any easier.

conclusion, i guess

i don’t really have any conclusion to draw from writing this. i guess my learning process just doesn’t mesh with how Rust works, and that’s why i bounced off of it.

i definitely think it’s worth thinking about this for any language–or any other tool in general, even–that you dislike. it’s honestly kind of depressing to be extremely negative about things without being able to articulate why. i’m sure i’ve annoyed plenty of friends by complaining about Rust or any other tool they like.

in fact, i should write a post like this for every language i dislike! Go, Elixir, maybe even PHP–well, maybe not that last one. it’s been so long since i last used it that i’m sure all my problems with it have been fixed at this point.


  1. please ignore that it’s been stable for over 9 years. ↩︎

  2. everything seems to evolve into crabs these days. ↩︎

  3. wait a second, does that mean i just used a reference-counting garbage collector? ↩︎

  4. sqlx, the Rust library that converts database rows to strongly typed structs using reflection magic (macros), not to be confused with sqlx, the Go library that converts database rows to strongly typed structs using reflection magic (the reflection package). they are somehow completely unrelated. ↩︎

  5. this is, coincidentally, why i don’t use LLMs. ↩︎

#Programming