polymorphic function


Also found in: Wikipedia.
Related to polymorphic function: polymer

polymorphic function

n
(Computer Science) computing a function in a computer program that can deal with a number of different types of data
Mentioned in ?
References in periodicals archive ?
This means that the checking rule will perform significantly better on polymorphic function types such as All (X) () [right arrow] (X [right arrow] X), where the result type mentions a polymorphic variable in both positive and negative positions.
The ability to eliminate variables in this way is a crucial reason for choosing the "Kernel" variant of F [is less than is equal] rather than the "full F [is less than is equal to]" variant where two polymorphic function types with different upper bounds for their type components are allowed to stand in the subtype relation under appropriate conditions; in the latter system, it can be shown that variables cannot always be eliminated in a most general way [Ghelli and Pierce 1998].
This occurs when a polymorphic function or constructor is applied to an argument list that includes an anonymous abstraction.
Intuitively, the independence of nonlocal procedures from local state corresponds to the parametricity of a polymorphic function whose type argument ranges over possible pieces of local state [Reynolds 1983; O'Hearn and Tennent 1995].
The translation could be arranged so that each M* was a polymorphic function of type [MATHEMATICAL EXPRESSION NOT REPRODUCIBLE IN ASCII].
A polymorphic function will be an element of an indexed product, indexed by cpo's in Level1, subject to a relational parametricity condition:
A generic function, or polymorphic function as it is sometimes called, is one whose implementation depends on the types of its arguments.
For example, C++ provides mechanisms for user-defined compile time and run-time polymorphic functions, but Fortran does not provide any means for user-defined polymorphic operators.
Most importantly, the use of a spanning set of classes respects abstraction barriers by using the same syntax for polymorphic functions written on system-defined data types as for those written on user-defined classes.
Such a function specifies a form of type-safe dynamic type dispatch, wherein a polymorphic function dispatches at run-time on the basis of type arguments.
The rule demonstrates that the typerec defines a polymorphic function of type [inverted]A[Alpha] [is less than]: [Rho].
Algorithm S does not attempt to find the right type schemes of polymorphic functions.

Full browser ?