Applying polymorphic functions to arguments of different types
Polymorphism
Ad hoc polymorphism
Function overloading
Operator overloading
Parametric polymorphism
Generic function
Generic programming
Subtyping
Virtual function
Single and dynamic dispatch
Double dispatch
Multiple dispatch
Predicate dispatch
v
t
e
In programming languages, ad hoc polymorphism[1] is a kind of polymorphism in which polymorphic functions can be applied to arguments of different types, because a polymorphic function can denote a number of distinct and potentially heterogeneous implementations depending on the type of argument(s) to which it is applied. When applied to object-oriented or procedural concepts, it is also known as function overloading or operator overloading. The term ad hoc in this context is not intended to be pejorative; it refers simply to the fact that this type of polymorphism is not a fundamental feature of the type system. This is in contrast to parametric polymorphism, in which polymorphic functions are written without mention of any specific type, and can thus apply a single abstract implementation to any number of types in a transparent way. This classification was introduced by Christopher Strachey in 1967.
^C. Strachey, Fundamental concepts in programming languages. Lecture notes for International Summer School in Computer Programming, Copenhagen, August 1967
and 25 Related for: Ad hoc polymorphism information
form the basis of generic programming. Parametric polymorphism may be contrasted with adhocpolymorphism. Parametrically polymorphic definitions are uniform:...
operator overloading, sometimes termed operator adhocpolymorphism, is a specific case of polymorphism, where different operators have different implementations...
to: Polymorphism (computer science), the ability in programming to present the same programming interface for differing underlying forms Adhoc polymorphism...
computer science, a type class is a type system construct that supports adhocpolymorphism. This is achieved by adding constraints to type variables in parametrically...
theory, subtyping (also called subtype polymorphism or inclusion polymorphism) is a form of type polymorphism. A subtype is a datatype that is related...
known as compile-time polymorphism and static polymorphism. Function overloading should not be confused with forms of polymorphism where the choice is made...
still in use today, including "R-value" and "L-value", "adhocpolymorphism", "parametric polymorphism", and "referential transparency". The lecture notes...
2003, Preface. Wadler, Philip (October 1988). "How to make ad-hocpolymorphism less adhoc". Peyton Jones, Simon (2003). "Wearing the hair shirt: a retrospective...
In computing, static dispatch is a form of polymorphism fully resolved during compile time. It is a form of method dispatch, which describes how a language...
dispatched dynamically. Virtual functions are an important part of (runtime) polymorphism in object-oriented programming (OOP). They allow for the execution of...
introducing the terminology R-values, L-values, parametric polymorphism, and adhocpolymorphism. In 1969, J. Roger Hindley publishes The Principal Type-Scheme...
language, with many variations possible. The presence of parametric or adhocpolymorphism in a language may also have implications for type compatibility....
described how to use double dispatching in Smalltalk, calling it multiple polymorphism. The general problem addressed is how to dispatch a message to different...
Whereas parametric polymorphism provides the same structure for every type instantiation, type families provide adhocpolymorphism with implementations...
set of interacting objects that enact operations referred to by name. Polymorphism is the phenomenon wherein somewhat interchangeable objects each expose...
for polymorphism. In statically typed languages (such as C++ and Java), the term generic functions refers to a mechanism for compile-time polymorphism (static...
combine interface specifications and to express adhocpolymorphism. Complementing parametric polymorphism, intersection types may be used to avoid class...
constructor can be used to express finite heterogeneous adhocpolymorphism (as opposed to parametric polymorphism). For example, the λ-term λ x . ( x x ) {\displaystyle...
than one of its arguments. This is a generalization of single-dispatch polymorphism where a function or method call is dynamically dispatched based on the...
theory, and category theory. Between 1991 and 1993, he researched adhocpolymorphism and demonstrated the characteristics of "parametricity" of second...
in use today, including R-values, L-values, parametric polymorphism, and adhocpolymorphism. Gerald Jay Sussman and Guy L. Steele, Jr. AI Memos, 1975–1980...
more flexible than nominative subtyping, as it permits the creation of adhoc types and protocols; in particular, it permits creation of a type which...