3 ms·
Option 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.
by fire_lake 2y ago
Option 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 2y agoHonest question - do you think there's a better way to do it?
- fire_lake 2y agoBetter than Go? Yes Rust, Haskell, OCaml all do it better. Better than those? Probably - the design space has hardly been explored!
- taylodl 2y 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 2y 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.