4

In several of Simon Peyton Jones's presentations, there is a page which shows the history of Type Classes:

enter image description here

There are quite a lot of materials to understand type classes from a programmer's view, such as the typeclassopedia article and many other tutorials. However its implementation and overhead are seldom described.

I am wondering what were the problems during the implementations and their solutions (I think there should be academic publications for the solutions).

In other words, I am searching materials like Inside the C++ Object Model, but for the Haskell language.

Yin Zhu
  • 16,980
  • 13
  • 75
  • 117
  • @Sibi the answer in the above question is far from satisfactory. Implementing the typeclass in the original paper is easy. The hard part lies in the "Higher-kinded polymorphism", type classes such as Monads. But I am no expert in programming, so I am asking this question. – Yin Zhu Feb 15 '15 at 14:25
  • 4
    There is no real extra complication in adding higher kinds. It's a simple matter of changing the type checker a little. – augustss Feb 16 '15 at 00:52
  • 1
    @YinZhu You might also be interested in the following posts (Edward Yang mentions some of the disadvantages of typeclasses) : http://blog.ezyang.com/2014/07/type-classes-confluence-coherence-global-uniqueness/ and http://blog.ezyang.com/2014/09/open-type-families-are-not-modular/ – artella Apr 19 '15 at 06:59
  • @YinZhu Also if you are interested in Edward's exciting work on backpack (which he mentions in the link above) you can have a look at http://web.mit.edu/~ezyang/Public/backpack-manual.pdf – artella Apr 23 '15 at 12:27

0 Answers0