
15 Oct
2008
15 Oct
'08
2:45 p.m.
The instance selection for an interface is done at run-time and this is inherently necessary. The instance (in a different sense) selection for type classes is almost always resolvable statically. In Haskell 98
In both cases, the dispatch is inherently dynamic, and in both cases, most dispatches can be resolved at compile-time with sufficient effort. The actual percentage may be quite different, tho. Implementation techniques are also fairly different, and the resulting coding style is also very different, but the two concepts are fundamentally very close to each other. Stefan