home *** CD-ROM | disk | FTP | other *** search
- From: kers@hplb.hpl.hp.com (Chris Dollin)
- Date: Thu, 21 Jan 1993 10:06:55 GMT
- Subject: Re: Re: FAQ Part 1 (of 2) [ a bit of polemic ]
- Message-ID: <KERS.93Jan21100655@cdollin.hpl.hp.com>
- Organization: Hewlett-Packard Laboratories, Bristol, UK.
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!hpscit.sc.hp.com!hplextra!otter.hpl.hp.com!hpltoad!cdollin!kers
- Newsgroups: comp.object
- References: <PCG.93Jan14154212@decb.aber.ac.uk> <1993Jan15.033713.27130@netcom.com> <PCG.93Jan19231409@decb.aber.ac.uk> <1993Jan21.024452.6
- Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
- Lines: 26
- In-Reply-To: kers@hplb.hpl.hp.com's message of 21 Jan 93 09:41:41
- Nntp-Posting-Host: cdollin.hpl.hp.com
-
- In article ... kers@hplb.hpl.hp.com (Chris Dollin) writes:
-
- A method is *polymorphic* in an argument A of type T if it may also be called
- with objects of type T' in the A position whenever T' is a subtype (derived
- class of, subclass of, inherits from) T.
-
- The previous paragraph had mentioned inclusion polymorphism, but this
- definition didn't. I hereby serve notice that I did *not* intend to limit
- polymorphism to only this case; in particular, the other common case is
- *parametric* polymorphism:
-
- A method is *parametrically polymorphic* in an argument A if it is
- independant of the type of A and so can be applied with values of
- any type in the A argument.
-
- In Eiffel, this is genericity; in C++, it can be obtained using template
- functions (the argument A must then be one of the template argument types).
- Dynamically typed (or, using Piercarlo's term, latently typed) languages
- usually have this as an automatic property.
-
- I don't know if it's easy to unify the two kinds of polymorphism in a
- single framework. Even if so, it might be useful to distinguish them.
- --
-
- Regards, | "You're better off not dreaming of the things to come;
- Kers. | Dreams are always ending far too soon." - Caravan.
-