4 ms·
It's 2024. We need an effective means for error propagation and the battle-tested solutions are try/catch exceptions or Optional types. Go's error handling woul
by taylodl 3y ago
It's 2024. We need an effective means for error propagation and the battle-tested solutions are try/catch exceptions or Optional types. Go's error handling would have been great in the 1970's, it's not so great now some 50 years later.
- demi56 3y agoSooo what’s the new 2025 way?
- fire_lake 3y agoOption types as error handling works but it requires proper syntax. Haskell can do it with do-notation and Rust has its special ? operator. Go has boiler-plate.
- taylodl 3y agoHonest question - do you think there's a better way to do it?
- fire_lake 3y agoBetter than Go? Yes Rust, Haskell, OCaml all do it better. Better than those? Probably - the design space has hardly been explored!
- taylodl 3y agoI was looking to modernize my skills in systems languages as C++ is my systems language of choice at the moment and I'd been deciding between Go and Rust (I know, to call Go a "systems" language is a bit of a stretch, but what we call a "system" is also a bit different these days) and I've decided it's going to be Rust.
- fire_lake 3y agoGo has more in common with Java or C# than Rust. You can get a Rust like experience with the latest C++ standard and a lot of tooling on top. That’s the true alternative in my view.