3 ms·
Lots of operations on Option and Result for example, and more and more added constantly. They don’t make code readable and it’s hard to remember it and often si
by lightgreen 7y ago
Lots of operations on Option and Result for example, and more and more added constantly. They don’t make code readable and it’s hard to remember it and often simple match is easier to write then trying to remember what’s the suitable function exist for the operation.
https://doc.rust-lang.org/std/result/enum.Result.html https://doc.rust-lang.org/std/result/enum.Result.html
- Ar-Curunir 7y agoThat’s not syntactic sugar, just normal method calls.
- _bxg1 7y ago> Lots of operations on Option and Result for example, and more and more added constantly. You mean methods? I actually don't have any issue with adding more methods and trait implementations, because those can be understood within the existing framework of language-level concepts. Of course the docs also need to highlight the "normal" usage with examples, but those do exist for Result, just not on this page: > See the std::result module documentation for details. std::result has quite a good explanation of "what are Results for and how are they normally used".