Where did the term "polymorphism" come from?
-
3 answers so far: Greek, Latin and English. – Vincent Ramdhanie Mar 13 '10 at 14:41
-
1Those are not mutually exclusive. Many English words have Greek or Latin roots. – danben Mar 13 '10 at 14:44
-
1i thought it came from that episode of Red Dwarf – fearofawhackplanet Apr 14 '10 at 12:39
4 Answers
It comes from the greek roots "poly" (many) and "morphe" (form). A polymorphic object can take on many forms (it can be represented by a pointer to any of its ancestor classes). A polymorphic function can also take on many forms (it can be made to operate on objects that are actually of different types).

- 74,820
- 18
- 121
- 166
-
This is the most concise definition I have seen for: "What is polymorphisim?" +1@tyler. (also related: http://stackoverflow.com/questions/409969/polymorphism-define-in-just-two-sentences) – Garrick Nov 06 '13 at 14:20
Well programmers stole the term from biology. Biology's been around much longer than OOP!
Looks like an inheritance hierarchy, doesn't it.
Anyway, polymorphism is when two members of the same species can have completely different physical traits. It looks like speciation, but it isn't. The example given is the "normal" jaguar and the "dark morph" jaguar
Another example is sexual dimorphism,
class Human
{
virtual void eat() ;
} ;
class Man : Human
{
// implementation for how a man eats:
void eat() override ;
} ;
class Woman : Human
{
// implementation for how a woman eats:
void eat() override ;
} ;

- 64,917
- 62
- 258
- 363
The word of Polymorphism comes from ancient greek. Something is polymorph, if it has more than one "shape/form".

- 18,838
- 2
- 61
- 93
Polymorphism is an English word that predates its use in computer science. It means "the ability to assume different forms or shapes." (reference http://en.wiktionary.org/wiki/polymorphism#Etymology)
This is analogous to the computer science concept in which an object can be treated as having many different types.

- 80,905
- 18
- 123
- 145
-
-
The word Etymology is also pure Greek. The word analogous as well. Just pointing out for those who downvoted my previous comment. – Soutzikevich Jun 13 '18 at 12:35