Re: Polymorphism vs. Overloading

monnier@di.epfl.ch (Stefan Monnier)
Tue, 1 Nov 1994 15:34:34 GMT

          From comp.compilers

Related articles
[28 earlier articles]
Re: Polymorphism vs. Overloading kanze@lts.sel.alcatel.de (kanze) (1994-11-01)
Re: Polymorphism vs. Overloading davidm@Rational.COM (1994-10-31)
Re: Polymorphism vs. Overloading bill@amber.ssd.csd.harris.com (1994-11-01)
Re: Polymorphism vs. Overloading drichter@pygmy.owlnet.rice.edu (1994-11-01)
Re: Polymorphism vs. Overloading bevan@cs.man.ac.uk (1994-11-02)
Re: Polymorphism vs. Overloading bimbart@CS.kuleuven.ac.be (Bart Demoen) (1994-11-02)
Re: Polymorphism vs. Overloading monnier@di.epfl.ch (1994-11-01)
Re: Polymorphism vs. Overloading nickb@harlequin.co.uk (1994-11-09)
Re: Polymorphism vs. Overloading franka@europa.com (1994-11-09)
| List of all articles for this month |

Newsgroups: comp.compilers
From: monnier@di.epfl.ch (Stefan Monnier)
Keywords: polymorphism
Organization: Ecole Polytechnique Federale de Lausanne
References: 94-10-144 94-10-183
Date: Tue, 1 Nov 1994 15:34:34 GMT

Joe Orost <joe@sanskrit.ho.att.com> wrote:
> o Ad-hoc/overloading: One function name can be associated with several bodies,
> o Parametric polymorphism/"genericity": Same source code generates multiple
> o Subtype polymorphism: Same run-time code operates on different types.


Actually, ad-hoc polymorphism is both overloading and subtype
polymorphism. It's called ad-hoc because the function actually called
depends on the specific situation. The choice is usually done at
compile-time for overloading and at run-time for subtype polymorphism.




Stefan
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.