Content deleted Content added
→Rules in function overloading: Fixed grammar and opinionated language, completely removed strongly opinionated paragraph with extremely bad grammar comparing to parametric/ad-hoc polymorphism. Tags: Mobile edit Mobile web edit |
m Bot: link syntax and minor changes |
||
Line 23:
* [[Clojure]]<ref>{{Cite web |title=Clojure - Learn Clojure - Functions |url=https://clojure.org/guides/learn/functions#_multi_arity_functions |access-date=2023-06-13 |website=clojure.org}}</ref>
* [[Swift (programming language)|Swift]]
* [[
* [[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}}
Line 39:
==Rules in function overloading==
* The same function name is used for more than one function definition in a particular module, class or namespace
* The functions must have different [[type signature]]s, i.e. differ in the number or the types of their formal parameters (as in C++) or additionally in their return type (as in Ada).<ref>{{cite book
| last1 = Watt
| first1 = David A.
| last2 = Findlay
| first2 = William
| title = Programming Language Design Concepts
| date = 1 May 2004
| publisher = John Wiley & Sons, Inc.
| isbn = 978-0-470-85320-7
| pages = 204–207
}}
</ref>
|