by sigmonsays · 2y ago · 0 comments
Everything is rust is way harder and more complicated than in go. However, with that added complexity you build rock solid software. Many times over i've ran into issues in go where something deep down in a library returns a nil on a pointer and my crap blows up in unexpected ways.
I think the more nefarious situation is when a library deep down decides to panic on you.
You might (rightly!) respond that you can exclude dependencies that use `unsafe`, but then you've just displaced the problem to "now I need to find new libraries". Point being, it's going to be a schlep either way. There will always be a schlep.
Which schleps you want to deal with, and how you want to deal them is the trade-off space that different programming languages position themselves within.
As I said in another comment, Rust is great, but there's a reason it's not universal. That reason is not that people are ignorant, stupid or lack the incentive to avoid schlep. It is instead that sometimes, dealing with Rust is harder than dealing with the rest of the damn problem.
In my case, I have noticed that Go is a good solution when Rust is not. I now have two arrows in my quiver. Neither is my favorite. I think this is the right attitude, personally.
Doesn't that mean precisely that Rust is easier than Go? Finding those bugs must be a nightmare, not to mention the impact of them happening in the first place, in prod...
Usually people say X is easier than rust because writing a program in X is easier than writing a program in Rust. When in fact they should be comparing (writing a program + debugging) in X vs (writing a program + debugging) in Rust
I suppose that boils down to whether you find it easier to wrangle Rust-isms or track down runtime bugs/panics. In many cases, I'd rather wrangle Rust-isms. In some cases (and they're not rare), I'd rather wrangle Go's runtime errors.
What makes some Rust people insufferable (not you, friend!) is that they think everything is about the language and toolchain, and they lose sight of the tremendous relevance of the application.
There's a reason not everybody is switching to Rust, and it's not because they're ignorant or stupid.
This is 100% accounting for program + debugging.
The anecdotal reason for this is because the human brain finds it easier to debug golang bugs then it does to write and completely understand all the semantics of rust. This is the same thing as why python is easier then C++ EVEN though counter-intuitively C++ has strict type checking and python doesn't.
Rust in my mind is ultimately better than C++ but it unfortunately, like C++, it retains a level a complexity past a certain reasonable level that prevents it from hitting ubiquity. Thus it's not the answer. There will be in the future some language out there that will be just as flexible/safe and less complex.