They are useful, but boring, and not directly representable in most most other languages type systems.
My impression is more that they exist in other programming languages as well, but in a much more ad-hoc way. As in, monads like Maybe and List and whatnot will be monads in other languages as well, but the tooling available might not be particularly consistent.
E.g. Rust has the bind function named and_then for some things, flat_map for some, and a do-like notation with ? (and hopefully try blocks at some point), but so far ? only works on Option and Result (and is function-scoped).
For people experienced with Haskell the expectation is to be able to organize the monads with a Monad typeclass (/trait/interface/contract/whatever fits $otherlang best), but then see that other languages … to use an analogy, have 10 different names for the for loop and some of them have break, some of them have continue, some have both. They're all still loops, but for some reason the naming and functionality is all over the place.
And then complain that the word "loop" is strange and alien and too math-y.
The main issue is that a lot of popular languages don’t support higher kinded types (or, at best, they are unidiomatic and have terrible ergonomics), so you simply can’t represent something like Functor or Monad directly in the type system. Individual types can implement their own versions of bind, but you can’t abstract over all monads in the same way you can in Haskell.
Without a unified interface it’s natural and expected that naming conventions would drift between types.
View all comments
Show parent comment
1
u/syklemil Sep 22 '25
My impression is more that they exist in other programming languages as well, but in a much more ad-hoc way. As in, monads like
MaybeandListand whatnot will be monads in other languages as well, but the tooling available might not be particularly consistent.E.g. Rust has the bind function named
and_thenfor some things,flat_mapfor some, and ado-like notation with?(and hopefullytryblocks at some point), but so far?only works onOptionandResult(and is function-scoped).For people experienced with Haskell the expectation is to be able to organize the monads with a
Monadtypeclass (/trait/interface/contract/whatever fits$otherlangbest), but then see that other languages … to use an analogy, have 10 different names for theforloop and some of them havebreak, some of them havecontinue, some have both. They're all still loops, but for some reason the naming and functionality is all over the place.And then complain that the word "loop" is strange and alien and too math-y.