Point-extent pattern for dimensioned numeric classes

Conrad Weisert · ACM SIGPLAN Notices · 1997

When we design an elementary numeric class, we usually overload some of the arithmetic operators +, -, , , / .Deciding which operators to overload and how to define them is a matter of common-sense and high-school algebra.Our class must support all the operators that make mathematical sense and none of the ones that don't.That seems obvious, but a lot of courses and textbooks that tell us all about how to overload an operator give us little guidance on when to do so.

Read the paper · More papers on PaperTik