Lesson plan

Polymorphism (computer science)

In programming language theory and type theory, polymorphism allows a value or variable to have more than one type and allows a given operation to be performed on values of more than one type. In object-oriented programming, polymorphism is the provision of one interface to entities of different data types. The concept is borrowed from a principle in biology in which an organism or species can have many different forms or stages. The most commonly recognized major forms of polymorphism are: * Ad hoc polymorphism: defines a common interface for an arbitrary set of individually specified types. * Parametric polymorphism: does not specify concrete types and instead uses abstract symbols that can substitute for any type. * Subtyping (also called subtype polymorphism or inclusion polymorphism): when a name denotes instances of many different classes related by a common superclass.

Back to article

Article summary

In programming language theory and type theory, polymorphism allows a value or variable to have more than one type and allows a given operation to be performed on values of more than one type. In object-oriented programming, polymorphism is the provision of one interface to entities of different data types. The concept is borrowed from a principle in biology in which an organism or species can have many different forms or stages. The most commonly recognized major forms of polymorphism are: * Ad hoc polymorphism: defines a common interface for an arbitrary set of individually specified types. * Parametric polymorphism: does not specify concrete types and instead uses abstract symbols that can substitute for any type. * Subtyping (also called subtype polymorphism or inclusion polymorphism): when a name denotes instances of many different classes related by a common superclass.

Key claims

No claims recorded.

Discussion questions

  1. Summarise the article in your own words. Which single claim would you verify first, and why?
  2. Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
  3. If two sources disagreed about one of these facts, what would you need in order to trust one over the other?

Bibliography

No sources recorded.

Key claims and bibliography are generated from the same tracked claims and sources as the article page.