I want to define a tripartite `Result` type which represents success, expected failure and unexpected failure (not for the first time I've tried but I have union types now!). It would be nice if I could find three equal-length words which convey these concepts. Which do you like?
I feel like the error cases sound a bit too severe. @viktorklang suggested that `Fault` should be the unexpected exception (I agree) and `Panic` would be better applied to a fatal exception, whereas my intention is that it's caught by the datatype so it can be safely handled.
-
-
But I'm coming round to `Value`, something and `Fault` after all the suggestions...
-
I agree, those feel right. Perhaps ‘Abort’ is more appropriate if ‘Panic’ is too closely tied to a fatal error on the order of a segfault.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.