Go backward to
Ad-hoc Polymorphism
Go up to
Top
Go forward to
Preview of Fun
Overloading and Coercion
Distinction may be blurred:
3 + 4 3.0 + 4 3 + 4.0 3.0 + 4.0
Different explanations possible:
+
has four overloaded meanings.
+
has two overloaded meanings (integer and real addition) and integers may be coerced to reals.
+
is real addition and integers are always coerced to reals.
Overloading and/or coercion or both!
For history of type evolution see
here
.
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: understand.tex,v 1.1 1996/06/12 09:38:21 schreine Exp schreine