Richard Rodriguez wrote:Hi Alexander,
I know that there are some difficulties that comes along learning monads, but I also know that they are useful and powerful. But is it required when building FP applications?
Do you need them for complex applications, and skip them for non-complex ones?
Thanks,
Richard
Hi Richard,
Thank you for the question!
Strictly speaking, you don't need monads in your FP applications, but you need a sequential IO. It's only Haskell who implements the sequential IO on top of the monads mechanism, and it's a very FPish solution. Other FP languages just let you doing sequential imperative calls.
What about non-IO monads, I'm sure that people implement this monadic behavior in different scenarios all the time, they are just unaware of this fact. What is ROP in F# if not a kind of Either monad? I'm sure Scott Wlaschin knows this, he just avoids calling it a monad.