Capterra Glossary
IT
Polymorphism

Capterra Glossary

Polymorphism

Polymorphism is a concept in object-oriented programming (OOP) that refers to the ability of a program variable, object, or function to take on various forms. There are three classes of polymorphism: ad hoc polymorphism, parametric polymorphism, and subtyping. 

Ad hoc polymorphism occurs when a program function is implemented in different ways, depending on entered coding variables. For instance, a plus sign operator is considered a polymorphic function because it can be used by software programmers in various ways, including the addition of integers, merging of lists, and the merging of strings in software code.

Parametric polymorphism allows programmers to write generic functions that treat all coding variable types (e.g. integers, characters, boolean operators) the same, which allows for faster computer calculations. 

Subtyping polymorphism allows programmers to substitute and reuse code in OOP languages by using a single name to refer to many programming objects that share variables and functions.

What Small and Midsize Businesses Need to Know About Polymorphism

Small tech startups that develop computer software using object-oriented programming often use the concept of polymorphism to access various software object types through a single interface. This simplifies the programming process, saving companies with limited resources valuable time and energy when programming new software solutions.

visitor tracking pixel