4 ms·
> That just depends on the paradigms of the language you use, anyone can add sugar to make either easier/harder to read. The questionmark operator, in particul
by paulgb 7y ago
> That just depends on the paradigms of the language you use, anyone can add sugar to make either easier/harder to read.
The questionmark operator, in particular, is what sold me on the possibility that this type of programming can be concise and ergonomic.
https://doc.rust-lang.org/edition-guide/rust-2018/error-handling-and-panics/the-question-mark-operator-for-easier-error-handling.html https://doc.rust-lang.org/edition-guide/rust-2018/error-hand...
- chaorace 7y agoI've not used Rust before, but this looks a lot like monads! Can I map/flatmap over these or do I have to unpack them later? If you _can_ operate on those like collections, Rust is a much more fun language than I initially gave it credit for!
- paulgb 7y agoYes, you can map over them, and it's great! I think they satisfy all of the monad rules, but I'm forgetting what they all are at the moment.