News for hackers. Stuff that matters.
Re:What Color Is Your Monad by chriswarbo on Wednesday February 16, 2022 @11:47AM (#30362269)
Haskell doesn't have null, so Optional is the usual alternative (actually called "Maybe" in Haskell, but it's the same thing)

Haskell values can throw exceptions (e.g. for division-by-zero, etc.); but catching them (and therefore branching on them) is an IO effect.

That sort of exception is treated like an unfortunate necessity in Haskell; and user code tends to use a more structured, well-typed approach like Either (there are a few alternatives floating around in common libraries)

There are no comments on this comment yet.