Content deleted Content added
→Static and dynamic polymorphism: Add link to unfamiliar term I had to look up while reading. -- Regards, AFZ (hi from Texas!) Tags: Mobile edit Mobile web edit |
NutronStar45 (talk | contribs) m →Ad hoc polymorphism: Fixed case |
||
Line 19:
===Ad hoc polymorphism===
{{Further|Ad hoc polymorphism}}
[[Christopher Strachey]] chose the term ''ad hoc polymorphism'' to refer to polymorphic functions that can be applied to arguments of different types, but that behave differently depending on the type of the argument to which they are applied (also known as [[function overloading]] or [[operator overloading]]).<ref name=Strachey00/> The term "[[ad hoc]]" in this context is not pejorative: instead, it means that this form of polymorphism is not a fundamental feature of the type system. In the [[Java (programming language)|Java]] example below, the <code>
<syntaxhighlight lang="java">
|