TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: andrew clarke
from: Neil Heller
date: 2004-07-09 16:16:00
subject: Polymorphism ?

ac> Function overloading.

It seems to me as though this is one type.

ac> This can then can extend to operator overloading if the need arises.

Are these intrinsically the same thing?  I think that I forgot my brain 
in the laundry room the last time I washed my clothes.

NH> Can anyone tell me a definitive and authoritative (and possibly 
NH> verifiable) source that I can use?  The last four words are the
NH> key to  that sentence.

ac> Well, what for?  Are you trying to win a bet?  :-)

I wish it were that simple.  When I went looking on the web for 
"definition of polymorphism" (and variants of those words).  I could 
find nothing definitive.

Given the following scenario:

Class A

Class B derives from Class A

Class C derives from Class A but does different stuff than Class B.

Somewhere in the main program, a pointer (or referent, depending on the 
language) of type Class B is instantiated.  That object does a few 
things and then for whatever reason, is coerced (typecast) to a Class A 
pointer.  It does something with a Class A object and then resumes life 
again as a Class B pointer.

Does this changing object represent a form of polymorphism?  How many 
different types of polymorphism are there?  Is there an actual number I 
can get my hands on?

þ CMPQwk 1.42 999

--- Maximus/2 3.01
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 633/267 270
@PATH: 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.