Double dispatching and Point
Ian Bicking
bickiia at earlham.edu
Mon Feb 2 20:10:38 UTC 1998
Bijan Parsia writes:
> At 1:45 PM -0500 2/2/98, Patrick Logan wrote:
> >(3) Point is a two-dimensional value. It cannot be made linear.
>
> (I'm assuming that by 'linear' one means 'having a one-to-one
> correspondence with the natural numbers'.)
>
> (Smalltalk) points are ordered pairs of integers (not of reals), correct?
> Thus, they have a mapping to the rationals.
>
> 1 at 1 --> 1/1
> 1 at 2 --> 1/2
> 1 at 3 --> 1/3
> etc.
I think the point is that Magnitude assumes that:
(a > b) | (a < b) | (a = b)
But when you consider, say, the points 2 at 4 and 1 at 2, they are neither
less than or more than each other -- but they are not equal either.
(the same problem would occur in a mapping x at y --> x+y, and any other
reasonable mappings I can think of from points onto numbers).
The ordering brought up before:
a > b ==> (a x > b x) | ((a x = b x) & (a y > b y))
satisfies the requirement (even though it isn't a map onto numbers).
However, it's rather arbitrary -- useful for, say, sorting, but not
much else. It's consistent but not meaningful. The current
implementation is (sort of) meaningful but not consistent.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|| Ian Bicking | bickiia at earlham.edu ||
|| drawer #419 Earlham College | (765) 973-2537 ||
|| Richmond, IN 47374 | ||
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
More information about the Squeak-dev
mailing list
|