Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Honest question - do you think there's a better way to do it?


Better than Go? Yes Rust, Haskell, OCaml all do it better. Better than those? Probably - the design space has hardly been explored!


I 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.


Go 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: