4 ms·
I'm not hacking Haskell very often, but I get now and then vibe from the community that: a. Avoid typeclasses until strictly necessary, http://www.reddit.com/r
by pacala 12y ago
I'm not hacking Haskell very often, but I get now and then vibe from the community that:
a. Avoid typeclasses until strictly necessary, http://www.reddit.com/r/haskell/comments/1j0awq/definitive_guide_on_when_to_use_typeclasses/ http://www.reddit.com/r/haskell/comments/1j0awq/definitive_g...
b. Haskell has no first class instances. http://joyoftypes.blogspot.com/2012/02/haskell-supports-first-class-instances.html http://joyoftypes.blogspot.com/2012/02/haskell-supports-firs...
> The ability to have only a single instance for each class associated with a type makes little theoretical sense. Integers form a monoid under addition. Integers also form a monoid under multiplication. In fact, forming a monoid under two different operations is the crux of the definition of a semi-ring. So, why does it make any sense at all that in Haskell there can be at most one definition of “Monoid” for any type?
<removed useless stuff>