Related articles |
---|
[12 earlier articles] |
Re: Polymorphism vs. Overloading geld@cs.sun.ac.za (1994-10-31) |
Re: Polymorphism vs. Overloading ram@cs.cmu.edu (Rob MacLachlan) (1994-10-25) |
Re: Polymorphism vs. Overloading billk@cs.ukans.edu (1994-10-31) |
Re: Polymorphism vs. Overloading Mike.Chapman@muc.de (Mike Chapman) (1994-10-31) |
Re: Polymorphism vs. Overloading jsm@id.dth.dk (1994-10-31) |
Re: Polymorphism vs. Overloading sofkam@rpi.edu (1994-10-31) |
Re: Polymorphism vs. Overloading andand@csd.uu.se (1994-10-26) |
Re: Polymorphism vs. Overloading dekker@dutiag.twi.tudelft.nl (1994-10-31) |
Re: Polymorphism vs. Overloading danhicks@aol.com (1994-10-31) |
Re: Polymorphism vs. Overloading odersky@ira.uka.de (Martin Odersky) (1994-10-31) |
Re: Polymorphism vs. Overloading bevan@cs.man.ac.uk (1994-10-27) |
Re: Polymorphism vs. Overloading pjj@cs.man.ac.uk (1994-10-28) |
Re: Polymorphism vs. Overloading jhf@c3serve.c3.lanl.gov (1994-10-28) |
[12 later articles] |
Newsgroups: | comp.compilers |
From: | andand@csd.uu.se (Anders Andersson) |
Keywords: | polymorphism |
Organization: | Computing Science Department, Uppsala University, Sweden. |
References: | 94-10-144 94-10-154 |
Date: | Wed, 26 Oct 1994 14:16:25 GMT |
Gabriela O. de Vivo <gdevivo@conicit.ve> wrote:
> [...] exact difference between Polymorphism and Overloading.
jhallen@world.std.com (Joseph H Allen) writes:
> The difference is purely syntactical.
A different and common answer is:
Overloading is the use of the same name for different functions.
Polymorphism is the use of the same function for different types of arguments.
According to this definition, the use of '+' for both addition of integers
and concatination of strings is overloading. A function that determines the
length of a list while ignoring the type of its elements is polymorphic.
Anders Andersson
andand@csd.uu.se
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.