4 ms·
In the second paragraph the author seems to be only talking about errors as C and go have then, specifically as errors as values, not as exceptions. The importa
by placeybordeaux 11y ago
In the second paragraph the author seems to be only talking about errors as C and go have then, specifically as errors as values, not as exceptions. The important difference being that exceptions can occur anywhere and can lead to non explicit bailing out of a function.
Exceptions complect failure and control flow.
Judging from the docs (and the comments on the blog) it looks like rust might have largely what the author is looking for. Can anyone speak to that?
- snuxoll 11y agoRust handles errors in a functional-style way with std::result<T, E>. This is the same technique I use in F# code with a identically named discriminated union.