Great article, and great lib. Thank you for spreading the concept of monadic error handling. I was also playing with it recently. I followed PromiseLike interface with my approach so, that it is actually possible to use async/await. I will be happy to hear your thoughts about it - npmjs.com/package/amonad
You can think of Result as eagerly evaluated and ResultAsync as lazily evaluated. They're two entirely different mechanisms and thus can't be merged into a single abstraction.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article, and great lib. Thank you for spreading the concept of monadic error handling. I was also playing with it recently. I followed PromiseLike interface with my approach so, that it is actually possible to use async/await. I will be happy to hear your thoughts about it - npmjs.com/package/amonad
Hey Alexey,
Thanks for the kind words :)
Note that
neverthrow
implements a promisible interface as well.See the
ResultAsync
docs hereOh, it looks cool! What is an advantage of having ResultAsync as a separate abstraction?
You can think of
Result
as eagerly evaluated andResultAsync
as lazily evaluated. They're two entirely different mechanisms and thus can't be merged into a single abstraction.