a decimal class for Squeak?

Patrick Logan patrickl at gemstone.com
Wed Jan 6 02:32:00 UTC 1999


> These are annoying little details about math...

Aren't these actually annoying little details of floating point
representation?

I agree with the earlier message that use of integers or fractions
would be better. An integer can represent units of some currency or
fractions thereof. For example, an integer can represent thousandths
of a cent if desired.

The, separating presentation from computation, a separate object can
have the responsibility for printing the value multiple ways. This
like separating a Date value from how the date is printed.

I don't see the advantage of using floating point and then
encapsulating a lot of round off rules in another class.

-- 
Patrick Logan                 mailto:patrickl at gemstone.com
Voice 503-533-3365            Fax   503-629-8556
Gemstone Systems, Inc         http://www.gemstone.com





More information about the Squeak-dev mailing list