Method names

Alan Kay alank at wdi.disney.com
Mon Nov 2 19:34:56 UTC 1998


Reinier --

We've talked a lot over the years of adding "units" (centimeters, feet,
grams, ounces, bits, bytes, etc.) to Smalltalk. They are very useful in
science for knowing what you are talking about, and in Smalltalk would be a
set of unarys (as you suggest) that help conversions to be made. (They also
could be symbolically executed to just get the dimensions of the quantity
.....).

Any interest out there in making a great units package for Squeak?

Cheers,

Alan

At 7:08 PM -0000 11/2/98, Reinier wrote:
>>
>> 	aBitStream next: 40 bits
>>
>In resolving such issues, I always try to think like a human ;-).
>What would you say as human? Problably something like: "dear bit stream
>please give me the next 40 bits". So, it seems that 'bits' is ok to use.
>But..., 'bits' tells us something about 40. In this case 'bits' defines the
>unit of 40. This would lead me to rephrase like: "dear bit stream please
>give me the next 40 elements where the unit is bits". Back to Smalltalk:
>
>	aBitStream next: 40 unit: #bits
>
>Or, maybe even better:
>
>	aBitStream next: ( 40 bits )
>
>where '40 bits' would yield an instance of Quantity *1.
>
>I think Quantity is one of the most important classes anyway. Oddly enough
>*2, you don't see it around much.
>
>Reinier.
>
>*1
>Object subclass: #Quantity instanceVariableNames: ' unit value '...
>
>*2
>Well, not really, all Smalltalk's offer technical classes only. No real
>world classes.
>





More information about the Squeak-dev mailing list