What class should include "5 kilograms"?

Travis Griggs tgriggs at keyww.com
Fri Nov 13 16:25:59 UTC 1998


Augustin Mrazik wrote:

> <snip>
>
> With adding Units to Magnitude, I think it would be reasonable to
> include ArithmeticObjects (abstract) as subclass of Magnitude and to put
> Number and Units as its subclasses. This would really express the
> situation: magnitudes on which also arithmetic operations are defined.
> And Numbers would be special Units without dimension (or without 'unit'?
> ;-).
>
> So long we have had only Numbers (from all possible arithmetic objects),
> we did not really need this class and Number had been immediate subclass
> of Magnitude.

Yes, and that would give a nice place to put Point as well, instead of
having to reimplement tons of Numeric protocol their as well.


--
Travis Griggs
Key Technology
tgriggs at keyww.com
Member, Fraven Skreiggs Software Collective
 - C for Sinking
 - Java for Drinking
 - Smalltalk for Thinking





More information about the Squeak-dev mailing list