Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Ad hoc polymorphism
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Applying polymorphic functions to arguments of different types}} {{Polymorphism}} In [[programming languages]], '''ad hoc polymorphism'''<ref>C. Strachey, [http://www.ics.uci.edu/~jajones/INF102-S18/readings/05_stratchey_1967.pdf Fundamental concepts in programming languages]. Lecture notes for International Summer School in Computer Programming, Copenhagen, August 1967</ref> is a kind of [[polymorphism (computer science)|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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)