[Curious] Integer division => fraction

Dan Ingalls Dan at SqueakLand.org
Fri Jun 13 05:47:06 UTC 2003


>Karl Ramberg <karl.ramberg at chello.se> wrote:
>	I'v mostly been bitten by fractions in points.
>	Points do not like fractions: why ?
>
>Why indeed.  As originally conceived, Points were (I believe) for
>representing points on the display, so it made sense for the x and
>y coordinates to be SmallIntegers (at that time, 14 or 15 bits, I think).
>
>But why I ask why is "what actually goes wrong?"
>...
>
>In a quick test of several dozen Point operations, I haven't found any
>that doesn't like Fractions.
>
>So tell us exactly what goes wrong, and let's FIX it!

There certainly have been times in the past when fractions broke things, most notably in, eg, rectangle and point arguments to BitBlt.  A number of years ago I did my best to fix most of these, but there may still be some such bugs, or the perception may simply linger on.

	- Dan



More information about the Squeak-dev mailing list