Overloading as a general concept is something you want very rarely, but is very useful when you do want it.
I really like that statement. Well put.
One area where overloading is highly desired is during unit testing. Although I'd classify it as 'overwriting' rather than overloading, the premise is the same. Make a function do something different than what the original does. For example, Mock::Sub does exactly this. Overriding functions during testing happens very often and is hugely useful.
In reply to Re^2: What's the point of this 'overload' idiom?
by stevieb
in thread What's the point of this 'overload' idiom?
by Cody Fendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |