You cannot compare apples with orange!
How many times we heard this sentence when we tried as children to do something apparently illogical?
We're here going to talk about an argument that looks like it: the overloading operation.
Despite of picture beside, the concept is indeed light: it's just a matter of definition, and programming languages usually give us all the possibility to redefine a wider set of expressions for the subject of overloading.
We surely cannot get an apple juice from only orange and vice-versa, but we surely can have one of fruit with both of them: we have just expanded the "making a juice" meaning.
So what about coding?
In this context we make the same, in the sense of a meaning addition: but which is the subject?
Generally every talk about overloading concerns a separation between the two possible macro fields of application:
i) operators overloading;
ii) functions/procedures overloading.
While this can be useful for specific differences between them two, in reality it could bring a novice to a little confusion. Overloading is the same for both of them; this is the main point, after which we can face every other aspect involved in its particularizations. ...continue reading "To Overload or not to Overload"