FidoNet Echomail Archive

<<< Previous Index Next >>>

From: Roy J. Tellason
To: Darin McBride
Date: 2004-07-14 04:06:20
Subject: Polymorphism ?

Darin McBride wrote in a message to Neil Heller:

 NH> Thank you for the example.  Whenever I read about Polymorphism, the 
 NH> authors (in every case) teach by example:  IOW, "here's how to do
 NH> it",  without stating what "it" is in a definitive way.

 DM> :-)

 DM> Polymorphism is practically defined by the virtual method.  That
 DM> is, a method which may behave differently just because your
 DM> reference is actually to an object derived from what you think it
 DM> is.  As the previous example, having a reference to an object of
 DM> type A, but you really refer to an object of type B or C.  Since B
 DM> and C are both derived from A, your reference is allowed to refer
 DM> to them, but when you call do_stuff, it does different stuff
 DM> depending on the real underlying object.


No wonder this oop-talk makes my eyes glaze over...

 * Origin: TANSTAAFL BBS 717-838-8539 (1:270/615)
SEEN-BY: 633/267 270
@PATH: 270/615 150/220 3613/1275 123/500 106/2000 633/267

<<< Previous Index Next >>>