| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Polymorphism ? |
NH> Can the term "polymorphism" be applied equally (and NH> correctly) to variables, operators and function names? PS> Yes, though operators and functions are not really PS> different things, and having a polymorphic variable is not PS> possible in any programming language that I know of. ;) If I were to instantiate a pointer to an object of Class A (call it opa), coercing that pointer into a type of Class B could do the following: #1 opa->foo(); #2 opb(opa)->foo(); Line #1 would do class A's foo() and line #2 would do class B's foo(). Is that not the action of a polymorphic variable? PS>Ciao PS>Pascal PS>--- Msged/LNX 6.1.1 PS>(1:153/401.2) þ CMPQwk 1.42 999 --- Maximus/2 3.01PS> * Origin: sed s/$(echo $HOME | sed 's/[[:punct:]]/\\&/g')/~/ * 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™.