[Haskell-cafe] programming style...and type classes...

Brandon Allbery allbery.b at gmail.com
Thu Nov 3 20:20:33 UTC 2016

On Thu, Nov 3, 2016 at 4:47 AM, Nicholls, Mark <nicholls.mark at vimn.com>

> i believe there is advice to avoid typeclasses stylistically? (see haskell
> wiki on style, allegedly because it leads to creeping haskell
> extensions...overlapping instances etc)...which lead you into the "wild"
> (allegedly SPJ)

Typeclasses are great when used properly and for their intended purpose.
There is a tendency for new Haskellers to overuse them, or to mistake them
for OOP classes and try to use them as such (which won't work, but *will*
cause the compiler to start suggesting increasingly-far-afield extensions
as it tries to make sense of what the programmer was trying to do).

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161103/0b646e01/attachment.html>

More information about the Haskell-Cafe mailing list