Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where did the term "polymorphism" come from?

Where did the term "polymorphism" come from?

like image 605
Alon Gubkin Avatar asked Nov 28 '22 10:11

Alon Gubkin


2 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).

like image 123
Tyler McHenry Avatar answered Jun 07 '23 08:06

Tyler McHenry


The word of Polymorphism comes from ancient greek. Something is polymorph, if it has more than one "shape/form".

like image 43
erenon Avatar answered Jun 07 '23 08:06

erenon