Talk:polymorphism

Latest comment: 12 years ago by 77.185.55.230

The explanation of the fourth meaning (in computer science) is quite wrong, or at least misleading.

First of all, it is not limited to object-oriented programming (nor object-oriented languages), and second, "true" polymorphism does not involve (or require) separate implementations ("definitions") of a function for different types, the latter referred to as "overloading". (The compiler may in fact generate different implementations though.)

Polymorphism is a concept of Type Theory, and most functional programming languages also directly support it. Polymorphism as a programming concept or style can even be applied in programs written in languages like, say, C, although it is not really a feature of the programming language itself. (Besides functions, data types or structures can be polymorphic as well, like usually any container type, e.g. a list of something.)

I know this is not Wikipedia... ;-)

77.185.55.230 16:14, 8 July 2011 (UTC)Reply

Return to "polymorphism" page.