Skip to main content

In computer science, polymorphism is a programming language feature that allows values of different data types to be handled in a uniform manner.

Polymorphism is a class of programming language features that allow a programmer to provide a single interface for multiple types. There are three main kinds of polymorphism.

  • - partial order defined on the set of types such that any provable property for a supertype also holds for all its subtypes.
  • or - where separate functions can share the same identifier.
  • or - where functions and collections can be specified generically so that they can be used on / contain any type.