2 ms·
> you really need to use haskell. Or Scala. They're the only two common-use languages I'm aware of whose type systems are expressive enough to define what a mo
by Twisol 4y ago
> you really need to use haskell.
Or Scala. They're the only two common-use languages I'm aware of whose type systems are expressive enough to define what a monad (or a category, or a ...) is internally. Of course you can identify particular monads (or ...) in any language, but you can't talk about them inside most languages.
- larve 4y agoC++ fits the bill as well (!) I wager that you can get pretty far with compile-time macros, even as rudimentary as C's, to encoder a fair bit of generic monad machinery.