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?
-
-
Replying to @propensive
Do you already considered a classic Success, Failure and then Failure can be either Expected or Unexpect?
1 reply 0 retweets 2 likes -
Replying to @__aleagnelli__
Oh, so there would be an extra layer to the type hierarchy? It's a definite possibility, though I think that modeling it as three peer subtypes would be easier to work with in most cases, *but* an extra "Failure" extractor could be useful to unify the two kinds of failure!
1 reply 0 retweets 0 likes -
Replying to @propensive @__aleagnelli__
It could have the virtue of drop-in compatibility with existing concepts - I guess it depends on how many other new things it comes with?
1 reply 0 retweets 0 likes -
Replying to @hardlianotion @__aleagnelli__
Would explicit conversions to other types like `Option` and `Try` be enough?
1 reply 0 retweets 1 like -
Replying to @propensive @hardlianotion
For the failure it could be good to have an `Either` conversion (`Right` expect, `Left` unexpected), but that depends on what you need
1 reply 0 retweets 2 likes
Yes, that makes sense too.
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.