units

Ken Dickey kend at apple.com
Fri Nov 13 00:26:27 UTC 1998


>>> OK, so when one of these funky non-mathematical o
>Ken Dickey <kend at apple.com> writes (with salt):
>> Numerical operations such should only operate on the numeric part of the 
>> object.
>
>Do you mean that the units operations and numerical operations should
>be in separate methods, or that these objects shouldn't be numbers, or
>what? I think the message #* is telling a dimensional object both to
>change its numerical value, and to change its units. How would it "only
>operate on the numeric part of the object"?

Ah, I was unclear.

What I should have said is that I would prefer that scalar numbers are 
treated as dimensionless.  I was presuming that a dimensional object 
consists of a triple <numeric-magnitude, unit, dimension> i.e. <2, meters 
per second second, length per time time>.

E.g. if I want to double a recipe, I want 
     2 * (<2 cups> of flour) -> <4 cups> of flour
I don't want "cups squared" or some other nonsense.

Hope the above came across better.

Cheers,
-KenD





More information about the Squeak-dev mailing list