Comment

Comment by wyager

> I am now going to look for a tutorial on Monads that's written in, say, Python

It probably won’t be very helpful. The definition of a monad is 90% in the types.

People use Haskell to talk about monads for two reasons:

1. Its type system is expressive enough to represent them (parametric polymorphism and higher-kinded types)

2. It’s one of a very small number of languages that doesn’t let users wiggle their way around needing some kind of principled effect system, so you really can’t get away without monads. Only in such an environment can the social pressure to take shortcuts be overcome, forcing people to structure their code carefully enough that the rich concept of monads isn’t reduced to a few occasionally used and probably incorrectly implemented corner cases like optional values and maybe futures.

parent wyager 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton