[Pharo-project] Fwd: [squeak-dev] Units package

Marcus Denker denker at iam.unibe.ch
Fri Jun 27 03:30:01 EDT 2008


On 27.06.2008, at 09:04, Stéphane Ducasse wrote:

>>
>> we should harvest the Units....latest version
>>

Do we want it as part of the image?

I am a fan of growing the number (and deepness) of abstractions  
available
as part of what one percives as the "language"... e.g. I am quite sure  
that the
math capabilities of the programming language of the future will be  
more similar to
mathematica then to C.

Having "native" support for dealing with Units is, I think, something  
that a language
should have built in. In most situations, numbers are used to model  
something that has
a unit... and today we have the memory and processing power to model  
this in most
cases.

The units package allows one to write expressions like:

        25 inches as cm

and do calculations with these units.

But there is always the danger of putting "too much" into a system.  
All the stuff we are
cleaning now in pharo is an example for that. So there is definitely a  
tension between
providing more abstraction vs. simplifying the system to it's bare  
minimum.

For the units, I lean towards including them.

      Marcus

>> Begin forwarded message:
>>
>>> From: "Marcus Denker" <denker at iam.unibe.ch>
>>> Date: June 24, 2008 2:11:45 PM CEDT
>>> To: "Balázs Kósi" <rebmekop at gmail.com>
>>> Cc: The general-purpose Squeak developers list <squeak-dev at lists.squeakfoundation.org 
>>> >
>>> Subject: Re: [squeak-dev] Units package
>>> Reply-To: The general-purpose Squeak developers list <squeak-dev at lists.squeakfoundation.org 
>>> >
>>>
>>> Hello,
>>>
>>> the bug seems to be fixed in the last version. I harvested the  
>>> test to make sure (this is
>>> in Units-md.16 on SqueakSource)
>>>
>>> The versions starting with -14 contain many enhancements (and the  
>>> bugfix). This was contributed
>>> by Pinesoft (http://www.pinesoft.co.uk/).
>>>
>>> Maybe the universe version could be updated?
>>>
>>>       Marcus
>>>
>>> -- 
>>> Marcus Denker -- denker at iam.unibe.ch
>>> http://www.iam.unibe.ch/~denker
>>>
>>>
>>> On Thu, Jun 19, 2008 at 4:56 PM, Balázs Kósi <rebmekop at gmail.com>  
>>> wrote:
>>> > UnitValue >> hash
>>> >        ^value hash bitXor: unit hash
>>> >
>>> > and
>>> >
>>> > testEquality
>>> >
>>> >        self deny: (60 units: #seconds) hash = (60 units:  
>>> #meters) hash.
>>> >        self deny: (60 units: #seconds) = (60 units: #meters).
>>> >        self deny: (60 units: #seconds) hash = (1 units:  
>>> #minutes) hash.
>>> >        self assert: (60 units: #seconds) = (1 units: #minutes).
>>>
>>> Much better :)
>>>
>>> Cheers, Balázs
>>>
>>> ps: cc-d to Marcus Denker, because he seems to be maintainer of  
>>> the package.
>>>
>>>
>>>
>>>
>>
>>
>>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project





More information about the Pharo-dev mailing list