linkedin facebook twitter rss

26 Nov overloading

Digital Data StreamSome object-oriented programming languages permit reuse of the same function name to perform different functions in different contexts. This polymorphism mirrors polysemy which creates ambiguity in human languages. Function overloading or method overloading, found in programming languages such as Ada, C++, C#, Delphi, D, Java, and Swift, allows creating more than one method with the same name that differ from each other in the type of the input and the output of the function. In operator overloading, or ad hoc polymorphism, different operators have different implementations depending on their arguments. In either case, programmers are required to keep these things straight in their minds and documentation to ensure proper functioning code.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.