> 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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to