How ‘good practice' is it to return a `Flow<Eit...
# arrow
c
How ‘good practice' is it to return a
Flow<Either<ErrorType, SuccessType>>
? Is there a specific type for this, or is it fine?
j
What seems wrong about it?
r
There will be a specific computation block for that once we solve some issues in arrow-continuations regarding suspensions in where you should be able to bind straight to success type, other than that nothing wrong with that if you prefer Either over exceptions.
a
@raulraja That's good to know, I'm porting some cats-effect/fs2 code to use Kotlin's flow and that'll be nice to have. Do you know if there is an issue for that improvement?
r
There is an internal issue and ongoing work happening this week around that at 47 Degrees and @danieeh already submitted a Pr to arrow core to get rid of the reflection tricks in favor of arrow continuations. When we fix that this week we are gonna work on building fx blocks for streams and others
🚀 1
👏 1
fx streams is inspired by fs2 but in suspend mode
just in case it helps
a
Thanks, I'll check that out.
c
I just don't like how exceptions make Flows harder to think about, because you can't just try-catch since everything is delayed. Using Either seems much easier. Also the Stream thing looks interesting!
j
Arrow-fx Streams are awesome. It's like Rx on top of coroutines. But much nicer to use.
❤️ 1
c
Is there a tutorial/intro page to introduce the concepts, like there is for Arrow Core? Or is just Dokka for now?
r
Just dokka for now but we will have some docs before the stable release