Comment

Comment by taolson

Agreed. But there's a big difference between parametric polymorphism (List<A>) and ad-hoc polymorphism like typeclasses. It would be very painful to have to write a new list type for any kind of value type it might hold, but with monads you have many fewer distinct implementations (mainly just Maybe / Either / List / State / IO) and their actions are so different that you almost have to know exactly which monad you are using in the code, so "generic" code that can operate with any monad is less useful.
parent taolson 13 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton