Calling a method when arithmetic operators are used on objects, Is this possible in Objective-C bar some sort of C macro.
EG:
It seems such a waste of time and readability to call such methods on such objects when they only represent numbers.
EG:
Code:
myFraction = aFraction * anotherFraction;
//Is the same as
myFraction = [aFraction multiplyBy: anotherFraction];
It seems such a waste of time and readability to call such methods on such objects when they only represent numbers.