|
|
|
|
|
by chas
1709 days ago
|
|
Monads are a very different sort of abstraction than the kind that are used most of the time in C programming. In particular, they were originally developed in abstract algebra. Algebraic abstractions are super nice and useful for programming, but really the most accessible way to learn how to use them is to learn Haskell. The way the language is set up makes algebraic abstractions very ergonomic to use and as such, the Haskell world is the most concentrated set of folks thinking algebraically about programming. If you are interested in understanding why monads come up so much and how the abstraction works, learning enough Haskell to write non-trivial programs is the most approachable path. If you are dead set on learning about monads without learning Haskell (or a related typed functional language), I would focus on understanding Haskell-style functors and then applicative functors because they are simpler than monads, but they are deeply-related algebraic building blocks that are useful abstractions in their own right. When you are comfortable programming with them, monads shouldn’t be much of a leap. |
|