Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think Matt Might did a great demonstration of something easy you can do with type classes that you can't do easily without them, in this article:

http://matt.might.net/articles/best-programming-languages/

In a project of my own I did a similar thing with intervals to what he did with lattices: I defined a type class for intervals and then made lists of intervals an instance of the class. Greatly simplified my own code for very little cost.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: