The case of the mysterious distracting type class
I had a magical insight recently about something that was bugging me almost two years. The question was: why the hell was I so unproductive creating type classes! So here is the deal: when you develop, you combine invariants and transformation properties of your different pieces to make something new. If you are someone like me, you live your code, and that means that the relations between the different concepts throughout the code drive me "emotionaly". Yesterday, it occured to me that what is special with type classes is that they are "open". They are open because their properties are not always obvious from the definitions. Worse, new type classes often have unambiguous properties. I say open because by contrast if I avoid type classes by explictly defining type specific functions or if I create encapsulating types to replace the functional polymorphism by data variants, then I am in effect "closing" the desi...