7 ms·
Typeclasses were probably a killer feature for Haskell. I remember using functors in OCaml and they were pretty sweet, but typeclasses let you "label" types wit
by lambdasquirrel 13y ago
Typeclasses were probably a killer feature for Haskell. I remember using functors in OCaml and they were pretty sweet, but typeclasses let you "label" types with functions and values after the fact. Sure, ghc would complain about orphan instances (if you "labelled" the type outside of the file where it was declared), but it was so darn useful.