I continue to experiment with Go versus Rust, reimplementing the same functionality in both languages to compare & really understand both tools from a realistic, unbiased view
I can understand why there are lots of loud anti-Rust people, because I too remember how annoying it was at first not understanding any of it and thinking "why would anyone ever overcomplicate to this degree when a simpler language can do the same just fine". Constant errors, the compiler always screaming at you, wtf is an Arc<Mutex<>>, wtf is a Clone trait...? It's easy to hate, because anyone supporting this difficult madness has to be a dumb ego-coder, right? After all "an idiot admires complexity, a genius admires simplicity"
Well I'm really thankful that I stuck with the annoyingly difficult Rust, because these days when I code idiomatic Go and idiomatic Rust side-by-side, the Go really isn't "simpler". Sure, there are fewer keywords. Sure, there are fewer concepts one has to understand to get started. But at the end of the day, I always feel it's easier to wrap my head around the Rust code when I ask myself
1) what does this code do and 2) what can go wrong
The biggest factor for me is that Rust code is often less LOC for the same logic AND verifiably safe (as long as there's no `unsafe`, of course). Instead of being distracted from the happy path with `if err != nil` you get the same by the simple `?`. match is fantastic for describing conditional logic in a simple way. Zero cost abstractions!
You can write crap code in both. You can write overly complex code in Rust overusing generics, Arcs, whatever, just as you can write overly verbose messy code in Go. A bad architecture is not the language's fault. And I remember how easy it is to make bad design decisions when you're still learning the language, something I wrongly blamed Rust for while I was learning it.
At the end of the day I really feel Rust is an investment. It takes time and it's annoying, sure. But once I grasped the concepts of the language and got comfortable with it, I really don't feel more productive in Go and I don't feel it's simpler. If anything, Go is more annoying because it takes more LOC for the same logic, it's not as safe (read: future me needs to deal with this in prod), and it's often slower at runtime than the Rust counterpart. Also, Cargo is the nicest tooling I've ever had the pleasure of using.
And back to the anti-Rust people, I get it: when people sharing Rust success/praise it's easier to brand them as "cultists" than admitting it's a skill issue. The only things I like about the language is that 1) it's easy to onboard if there are lots of devs on the same project of varying skill and experience, 2) the stdlib having most of what you need is really nice, and 3) there's no function coloring (which is something you pay for with CGO overhead).
This slideshow (pic) from this (
youtu.be/QrrH2lcl9ew?si=Hx18…) talk shows what happens when devs get comfortable with Rust
This (longer than expected) post is what I wish I'd read a couple of years ago when I got into the "simplicity bro" mindset of Go thinking all Rustaceans were dumb ego-coders