seeking ideas for short lecture on type classes

Lauri Alanko la@iki.fi
Mon, 27 Jan 2003 12:25:52 +0200


On Mon, Jan 27, 2003 at 08:37:06PM +1100, Fergus Henderson wrote:
> I agree.  The above characterization is highly misleading.  It would be
> more accurate and informative to say that both Haskell and OO languages
> dispatch on the dynamic type of a value.

What is the "dynamic type of a value" in Haskell, apart from existentials
and Dynamic? Ordinary type class dispatch is all done based on the types of
variables, not their values. All the dispatching could even be done at
compile time by specializing everything...


Lauri Alanko
la@iki.fi