Go backward to
Universal Polymorphism
Go up to
Top
Go forward to
Overloading and Coercion
Ad-hoc Polymorphism
Overloading
Same name denotes different functions.
Context decides which function is denoted by particular occurence of a name.
Preprocessing
may eliminate overloading by giving different names to different functions.
Coercion
Type conversions
convert an argument to a type expected by a function.
May be provided statically at compile time.
May be determined dynamically by run-time tests.
Only
apparent
polymorphism
Operators/functions only have
one
type.
Only syntax "pretends" polymorphism.
Author:
Wolfgang Schreiner
Last Modification: May 27, 1998