Polymorphism and Types
The term "polymorphism" refers to the ability of code (in particular, methods or classes) to act on values of multiple types, or to the ability of different instances of the same data structure to contain elements of different types. Type systems that allow polymorphism generally do so in order to improve the potential for code re-use: in a language with polymorphism, programmers need only implement a data structure such as a list or an associative array once, rather than once for each type of element with which they plan to use it. For this reason computer scientists sometimes call the use of certain forms of polymorphism generic programming. The type-theoretic foundations of polymorphism are closely related to those of abstraction, modularity and (in some cases) subtyping.
Read more about this topic: Type System
Famous quotes containing the word types:
“The bourgeoisie loves so-called positive types and novels with happy endings since they lull one into thinking that it is fine to simultaneously acquire capital and maintain ones innocence, to be a beast and still be happy.”
—Anton Pavlovich Chekhov (18601904)