Articles on type class

Jared Carroll

Jared Carroll

Better Cohesion with the Type Class Pattern

Encapsulation is often called the core of object-oriented programming. Data is bundled with the functions that operate on that data. However, too much behavior can lead to monolithic, incohesive classes. The type class pattern preserves a class’s core behavior but defines orthogonal behaviors externally. Type classes allow you to “extend” both user-defined and native classes