News for hackers. Stuff that matters.
Re:What was your "ah ha" moment with Haskell? by sordina on Sunday June 24, 2012 @11:09PM (#4154917)
I didn't have a single "ah ha" moment, but things became much clearer when I realised that although it was possible to have heterogeneous collections through the use of type-classes, what I nearly always wanted was to create a new data type with a constructor for each behaviour I was interested in encompassing.

The fact that data-types are so cheap, both syntactically and computationally, really frees you up from having to worry about not creating them. I did go too far the other way for a while and created new types for everything. There exists a happy middle ground, but it's hard to define where exactly it lies.

There are no comments on this comment yet.