On 20-May-1999, Brian Boutel <[EMAIL PROTECTED]> wrote:
>
> Of course it *can* be done, but *should* it be done?
>
> Uncontrolled overloading means that when you see a function application
> you can't immediately see what function is being applied - you see its
> name but not its semantics, because there may be many different functions
> with the same name.
The same already applies to type classes, to some extent -- you need to know
the types involved in order to know the exact semantics.
> What would be gained by allowing ad hoc overloading?
> If operations on different types have similar meaning
> there is a case for defining a new class.
> If you have existing different functions with similar names you can
> qualify them to avoid the ambiguity. When else would you want this feature?
If the existing functions are used only in contexts where it is clear
from the types which one is intended, why should I have to explicitly
qualify them?
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.