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?
Do you think that reuse of names that are used for `Try` would be a problem? I also considered `Right`, but didn't want to conflict with `Either`...
-
-
Correct, Incorrect, Catastrophic
-
Or change Result for Outcome and have Happy / Sad / Grim.
End of conversation
New conversation -
-
-
Thought about it, but unlike Right/Left they’re not in the prelude and they’re not used that often in my experience
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Scope them in the sum type's companion object: Result.Success, Result.Failure... Removes the ambiguity when necessary, and people can always `import Result._` if they don't think there is an ambiguity to remove.
-
I think I can make it an enum, so it will be that way anyway. :)
- 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.