Hacker News new | ask | show | jobs
by zests 2255 days ago
I actually enjoy the container types and callback errors. The wrapper type Mono<T> acts like a monad of type Promise<Either<T | Error>>. This completely isolates a computation from the rest of the code and puts all of the error handling in one place.

I despise side effects as well as try/catch error handling so these are an especially welcome improvement to java/kotlin.

I don't have much experience with coroutines/flow so I can't actually compare the two approaches but this is my experience with the reactor library. Its unlikely that I will get a chance to continue using Kotlin in the near future but next time I do use Kotlin I will definitely try the coroutine approach and see how it compares.