4 ms·
I have been coding in Scala/ Haskell for the last 10 years, before that 15 years in Java. What I'm seeing is that there are as many lazy developers in FP as the
by misja111 3y ago
I have been coding in Scala/ Haskell for the last 10 years, before that 15 years in Java. What I'm seeing is that there are as many lazy developers in FP as there are in Java, maybe even more.
And despite all the nice safeguards that FP provides, there are still plenty of ways for lazy devs to work around them.
For instance the IO monad, which is used everywhere Scala/Cats. It can contain a result or an error. If you don't feel like checking for an error after you called some method, you can just pass it up and return the IO from your method.
Does that sound familiar? It behaves just like a checked exception, the only difference is that methods don't need to declare any error or exception in their IO signature.
- mrkeen 3y ago> It behaves just like a checked exception, the only difference is that methods don't need to declare any error or exception in their IO signature. Then it behaves like an unchecked exception. Which is fine. 'Checking' is the act of modifying your source code to declare the error.