4 ms·
I'm going to flip the discussion a bit, and ask, what is a good use of operator overloading? What is a bad one? Is it possible to generalize the rules around
by scj 9y ago
I'm going to flip the discussion a bit, and ask, what is a good use of operator overloading? What is a bad one? Is it possible to generalize the rules around good vs. bad cases (in order to make a programming standard others can follow)?
My experience is that I like writing code that uses operator overloading, but hate reading code that has it. Kind of like programming in Perl. In both cases, I find that on large projects, it is best to avoid the technology.