> Look at all the monad insanity Haskell has to do to get the equivalent of a print statement
but it's easy to do that! If you meant something more complex and subtle perhaps you should have made a more complex and subtle claim.
> Look at all the monad insanity Haskell has to do to get the equivalent of a print statement
but it's easy to do that! If you meant something more complex and subtle perhaps you should have made a more complex and subtle claim.
> There is nothing that has to do with monads at all in printing a string. The idea that `putStrLn "hello world"` is monadic is as absurd as saying that `[1,2,3]` is monadic.
You haven't linked any exemplar tutorials, but I feel confident in saying the ones you're referring to teach the general concept of monads, and not how to do IO with monads.
Quite a number of JavaScript developers learned how to use `andThen` with Promises/A+ back in the day, and they didn't need to learn about monads either. (In fact, when it was raised that promises are really monads, there was serious drama and outrage [1] -- an existence proof if there ever was one, that you can use something productively without understanding it as a monad.)
Likewise, nobody would claim that you need to understand monoids before you can concatenate lists. Concatenating lists is as native to lists as sequencing commands is to IO; it's just part of how those types work. The monad interface abstracts over that idea, and learning that abstraction in its full generality is, typically, what people stumble on.
[0]: https://blog.jle.im/entry/io-monad-considered-harmful.html
[1]: https://github.com/promises-aplus/promises-spec/issues/94
Relative to programming in general, monads are easy to work with, easy enough to understand, but I’ll grant you often poorly explained.
Those people writing monad tutorials (those are written about as often as they are read) aren't trying to learn how to do I/O.
(And of course "it's just a monoid in the category of endofunctors".)