Units package

Helge Horch hhorch at wuerzburg.netsurf.de
Wed Nov 4 02:12:52 UTC 1998


At 04:59 03.11.98 -0800, Alan Kay wrote:
>This looks good, and also some of his music stuff looks cool too. I sent
>Andrew an email also.

Andrew asked me to forward his response to the group:

At 12:40 03.11.98 -0500, he wrote...
>Thanks for your message.  I'm not on the Squeak mailing list
>right now, but I am a Squeak enthusiast.  I'll try porting the
>unit stuff over to Squeak some time (or maybe someone else wants
>to try?) - it shouldn't be too hard since there's no GUI stuff.
>Regarding terms of usage, I don't have any problem just making
>it restriction-free...I'm not making any money off it, anyhow.

I have since converted the code from Dolphin pac format to a Squeak change
set now. It doesn't really run yet. These are the open issues:

1.) The package seems to rely on arithmetic being done by double dispatch -
at least that's my impression at a first glance. (I have been wrong
before.) One class is subclassed from a Dolphin class "ArithmeticValue"
that Squeak doesn't have. (To get it to compile, I have made a Magnitude
subclass of that name.)
Therefore it doesn't even process the initialization "Unit initialize"
correctly yet.

2.) Error reporting is done via InconsistentUnitsError, an ArithmeticError
subclass that uses Dolphin's signal mechanism. (For now, I have put it
under Object... perhaps we could just use Object>>error: here.)

3.) It seems to require Number>>isZero, which I have added on the fly
before my time ran out.

I am way too busy to further dive into Units for now, so I have put up the
first cut (50 KB) at
<http://netsurf.citylink.de/users/hhorch/Units.Step1.cs> so other
volunteers can take a stab. For now, I have left Andrew's original
"giftware" notice in.

Happy hacking,
Helge





More information about the Squeak-dev mailing list