News for hackers. Stuff that matters.
Re:Monad Confusion and the Blurry Line Between Data and Comp... by nextaccountic on Sunday August 07, 2022 @09:40AM (#32376388)
Yep! It's as if Haskell had an I/O DSL that built a data structure - a tree with all interaction with the outside world - and the runtime interpreted this data structure. (of course the compiler is allowed to optimize that away). That way, Haskell can achieve purity - it does I/O by building an IO value technically using pure functions!

Haskell then decided to use this DSL for arbitrary types, again just to build data structures. Then, people noticed that monads were really cool.

There are no comments on this comment yet.