What class should include "5 kilograms"?

Michael S. Klein mklein at alumni.caltech.edu
Wed Nov 11 22:07:37 UTC 1998


On 11 Nov 1998 stan at stanheckman.com wrote:

> I agree that tensors and units should be bound together. But squeak doesn't
> have very useful tensors yet. Should we wait on the units until the tensors
> are done? The units package would be a little easier to write and a lot
> easier to read if it had access to linear algebra objects.

Of course you don't want to wait untill we have tensors.  But neither do 
you want to forge ahead without considering them.  I.E:

Do NOT make UnitThingy a subclass of Number (or some such).
I would declare UnitThingy two have instance variables ('units tensor'),
and would only assing numbers to the tensor instVar untill I had other 
things like vectors and matrixes, etc. to try out.

-- Mike

P.S. I would probably also come up with a better name than #UnitThingy





More information about the Squeak-dev mailing list