3 ms·
> In particular the common abstractions (Monad, Applicative, Functor) are used very differently in different libraries (everyone seems to want to write her own
by sfvisser 4y ago
> In particular the common abstractions (Monad, Applicative, Functor) are used very differently in different libraries (everyone seems to want to write her own DSL), so it's hard to get comfortable with third party libraries.
I don’t see how this is true. These common abstraction make reading code incredibly easy most of the time. Many Haskell libraries are based on compositional building blocks. Seeing a monoid, functor or monad instance gets you 90% there in understanding the usage. It’s really the superpower of Haskell that I miss (and badly reimplement) in every other PL.
- feanaro 4y agoCompletely agreed, but I guess this just doesn't click with some people as well as it did with me (empirically).
- smegma2 4y agoI was also wondering about this. I can't think of an example of a library implementing Functor in a surprising way, or in a way that somehow differs from another library.
- ParetoOptimal 4y agoExactly! And free theorems and polymorphism means even more things work as someone that understands the core abstractions would expect them to.