When to use the rejection branch #469
-
Hi! I am trying to draw a rough connection to Scala That leads me to another question: when should I use Future rejection instead of my own |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That's right. You can think of a Future as being IO + Either + Async/Cont.
The simplest answer to this is: when you want to. Fluture "mixes in" the Either type for two reasons:
Neither of these reasons are forcing you to use the rejection branch, though. If you'd rather stick with your own success/failure type, you can pretend the rejection branch doesn't exist, and use |
Beta Was this translation helpful? Give feedback.
That's right. You can think of a Future as being IO + Either + Async/Cont.
The simplest answer to this is: when you want to.
Fluture "mixes in" the Either type for two reasons: