4 ms·
I think it depends entirely on whether the overloads perform the same conceptual action. If I have a "send value" function that transmits over an existing netw
by MereInterest 7y ago
I think it depends entirely on whether the overloads perform the same conceptual action. If I have a "send value" function that transmits over an existing network connection, I can have overloads for bool, int, string, etc. Each does the same action, but for a different type.
In the other hand, overloads can do entirely arbitrary actions. If there is no consistency between the different overloads, then there is no reason to have them be named the same thing.
- rusk 7y agoI wad looking for Scott Meyers reference for this earlier and the one I found matches yours: ”use function overloading for type conversion”