Re:Object Oriented Programming is Inherently Harmful
by TheCoelacanth on Sunday November 30, 2014 @07:54PM
(#8678963)
Operator overloading is useful for a lot more than just math. Overloading * and -> is useful for pointer-like types. Overloading () is useful for function-like types. Overloading [] is useful for collections and overloading ++ and -- is useful for iterators.
Re:Object Oriented Programming is Inherently Harmful
by SamReidHughes on Sunday November 30, 2014 @08:48PM
(#8679101)
The overloading of (), [], and the like is used but it's not necessary. They could have been other named overloaded functions.
It's useful in vector math, complex number math, matrix math.