Overloaded Expression
Function overloading or method overloading is a feature found in various programming languages such as Ada, C++, C#, D, and Java, that allows creating several methods with the same name which differ from each other in the type of the input and the output of the function. It is simply defined as the ability of one function to perform different tasks.
For example, doTask and doTask(object O) are overloaded methods. To call the latter, an object must be passed as a parameter, whereas the former does not require a parameter, and is called with an empty parameter field. A common error would be to assign a default value to the object in the second method, which would result in an ambiguous call error, as the compiler wouldn't know which of the two methods to use.
Another appropriate example would be a Print(object O) method. In this case one might like the method to be different when printing, for example, text or pictures. The two different methods may be overloaded as Print(text_object T); Print(image_object P). If we write the overloaded print methods for all objects our program will "print", we never have to worry about the type of the object, and the correct function call again, the call is always: Print(something).
Read more about Overloaded Expression: Rules in Function Overloading, Constructor Overloading, Caveats
Famous quotes containing the words overloaded and/or expression:
“At bottom there is in Joyce a profound hatred for humanitythe scholars hatred. One realizes that he has the neurotics fear of entering the living world, the world of men and women in which he is powerless to function. He is in revolt not against institutions, but against mankind.... Ulysses is like a vomit spilled by a delicate child whose stomach has been overloaded with sweetmeats.”
—Henry Miller (18911980)
“Every production of an artist should be the expression of an adventure of his soul.”
—W. Somerset Maugham (18741965)