News for hackers. Stuff that matters.
Re:Ask HN: ELI5 What Is a Monad? by Tainnor on Monday November 14, 2022 @08:32PM (#33604119)
That makes no sense to me. Monad shows up in the type signature of a number of functions, so you can't just ignore the typeclass? Same goes for do notation which you can only use for monads (except if you use ApplicativeDo). I mean, I guess in many cases you can use Applicative instead of Monad, but I'm not sure that Applicative is easier to understand.

If your point is that you don't need to learn CT to understand how monads work in Haskell, or that you don't need to obsess about proving monad laws, then I agree.

But the fact that you can abstract over different types in such a way that something like Monad falls out as a language concept is what makes Haskell an unusual language compared to most others. If you want to just use individual monad instances without being able to generalise over them, you can use any other programming language.

There are no comments on this comment yet.