Where did the term "polymorphism" come from?

Where did the term "polymorphism" come from?

+4
source share
4 answers

It comes from the Greek roots "poly" (many) and "morphe" (form). A polymorphic object can take various forms (it can be represented by a pointer to any of its ancestor classes). A polymorphic function can also take various forms (it can be made to work with objects that are actually of different types).

+21
source

Polymorphism is an English word that precedes its use in computer science. This means "the ability to take various forms or forms." (link http://en.wiktionary.org/wiki/polymorphism#Etymology )

This is similar to the concept of computer science, in which an object can be considered as having many different types.

+3
source

Well programmers stole the term from biology. Biology has been much longer than OOP!

class

Looks like an inheritance hierarchy, doesn't it.

In any case, polymorphism is when two members of the same species can have completely different physical features. This is similar to speciation, but it is not. The above example is a โ€œnormalโ€ jaguar and a dark morph jaguar

jagblack jag

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 ; } ; 
+3
source

The word polymorphism comes from the ancient Greek. Something is a polymorph if it has more than one โ€œshape / shapeโ€.

+1
source

Source: https://habr.com/ru/post/1304020/


All Articles