Related articles |
---|
[10 earlier articles] |
Re: Polymorphism vs. Overloading mac@coos.dartmouth.edu (1994-10-25) |
Re: Polymorphism vs. Overloading joe@sanskrit.ho.att.com (1994-10-31) |
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) |
[14 later articles] |
Newsgroups: | comp.compilers |
From: | jsm@id.dth.dk (Jxrgen Steensgaard-Madsen) |
Keywords: | polymorphism |
Organization: | Department of Computer Science, Technical University of Denmark |
References: | 94-10-144 94-10-154 |
Date: | Mon, 31 Oct 1994 22:25:18 GMT |
Both overloading and polymorphism are terms used to characterize
functions from types into functions, i.e. of 'type'
TYPE -> FUNCTION
A polymorphic function is in principle one that returns the same
function for each type. An overloaded function typically returns
different functions for different types. The mapping from types
into functions is typically done at compile time for overloaded
functions.
The function returned by a polymorphic function, when given a type
argument, may in practice require some value parameters in addition
to those explicitly required. These can safely be described as
hidden and the corresponding arguments as automatically generated,
so in many respects both can be considered as non-existing. The
additional parameters should not be confused with identifications
of the type given to the polymorphic function.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.