Parametric Polymorphism

What Does Parametric Polymorphism Mean?

Parametric polymorphism is a programming language technique that enables the generic definition of functions and types, without a great deal of concern for type-based errors. It allows language to be more expressive while writing generic code that applies to various types of data. Functions written in context with parametric polymorphism work on various data types.

Advertisements

Techopedia Explains Parametric Polymorphism

Parametric polymorphism is the core principle behind generic programming languages and structures. It enables the creation of generic functions and data types that operate on values, regardless of data type.

For example, if a programming function operates on two different values, the values may be attached, even though they do not have the same data types. An example is joining a list of integers with a floating point value.

Ada, Haskell, Visual Prolog, Scala, Java and C# are programming languages that support parametric polymorphism.

Advertisements

Related Terms

Latest Programming Languages Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…