Re:From First Principles: Why Scala?
by mhitza on Thursday February 11, 2021 @02:03PM
(#26105708)
Doesn't Scala have transformer libraries like ExceptT in Haskell. Aside, much of what this comment thread is about, is similar in Haskell-land as well.
Anyway, a pattern I've started to use in Haskell with ExceptT is along the lines of
So the code still remains legible (minus the plethora of Haskell operators, data wrappers and unwrappers :)), I can trap individual exceptions along the way, which I can handle. And at the end unhandled exceptions are returned by the function as Left.
Anyway, a pattern I've started to use in Haskell with ExceptT is along the lines of
So the code still remains legible (minus the plethora of Haskell operators, data wrappers and unwrappers :)), I can trap individual exceptions along the way, which I can handle. And at the end unhandled exceptions are returned by the function as Left.