in reply to Re: What's the point of this 'overload' idiom?
in thread What's the point of this 'overload' idiom?
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: What's the point of this 'overload' idiom?
by LanX (Saint) on Dec 07, 2022 at 14:25 UTC | |
by eyepopslikeamosquito (Archbishop) on Dec 08, 2022 at 12:40 UTC | |
Re^3: What's the point of this 'overload' idiom?
by eyepopslikeamosquito (Archbishop) on Dec 08, 2022 at 12:40 UTC |