Re:Java 20 Is Out!
by ackfoobar on Tuesday March 21, 2023 @12:57PM
(#35249014)
Other than STM, what is special? Almost everything there has an equivalent in traditional imperative programming.
[ Parent
| on HN ]
More contracts enforced by the typer.
> Almost everything there
Everything. But the mere presence of "equivalents" doesn't make pure functional programming less valuable.
I have used cats-effect but not ZIO.
My view has been that reinventing imperative programming (IO monad) on math (pure FP) on imperative programming (the machine) brings me no benefit.
> What does a coarse-grained effect type get you?
For monofunctors: reliable error handling, an ability to re-interpret the same IO structure multiple times, better reasoning during refactorings due to referential transparency.
For bifunctors: the above plus explicit domain (expected) error encoding and even more reliable error handling.