Function overloading: Difference between revisions

Content deleted Content added
Add in-line citation. Change to active voice.
Line 24:
* Fortran
* [[Kotlin (programming language)|Kotlin]]<ref>{{cite web |title=Kotlin language specification |url=https://kotlinlang.org/spec/overload-resolution.html |website=kotlinlang.org}}</ref>
* [[Java (programming language)|Java]]{{sfn|Bloch|2018|loc=§Chapter 8 Item 52: Eliminate unchecked warnings|p=238-244}}
* [[Julia (programming language)|Julia]]
* [[PostgreSQL]]<ref>{{Cite web|date=2021-08-12|title=37.6. Function Overloading|url=https://www.postgresql.org/docs/13/xfunc-overload.html|access-date=2021-08-29|website=PostgreSQL Documentation|language=en}}</ref> and [[PL/SQL]]<ref>{{Cite web|title=Database PL/SQL User's Guide and Reference|url=https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm#i12352|access-date=2021-08-29|website=docs.oracle.com|language=en}}</ref>
Line 39:
It is a classification of static polymorphism in which a function call is resolved using some "best match" algorithm, where the particular function to call is resolved by finding the best match of the formal parameter types with the actual parameter types. The details of this algorithm vary from language to language.
 
Function overloading is usually associated with [[statically-typed]] programming languages that enforce [[type checking]] in [[function call]]s. An overloaded function is really just a set of different functions that happen to have the same name. TheFor determinationany ofparticular call, the compiler determines which overloaded function to use, forand aresolves particular call is resolvedthis at [[compile time]]. This is true for progamming languages such as Java.{{sfn|Bloch|2018|loc=§Chapter 8 Item 52: Use overloading judiciously|p=238-244}}
 
In [[Java (programming language)|Java]], function overloading is also known as compile-time polymorphism and static polymorphism.
Line 148:
* [[Operator overloading]]
 
==ReferencesCitations==
{{Reflist}}
 
==References==
*{{cite book | title= "Effective Java: Programming Language Guide" |last=Bloch| first=Joshua| publisher=Addison-Wesley | edition=third | isbn=978-0134685991| year=2018}}
 
==External links==