ANSI, =, hash, Integer, Float

Bryce Kampjes bryce at kampjes.demon.co.uk
Tue Dec 17 10:40:15 UTC 2002


Colin Putney writes:
 > 
 > On Monday, December 16, 2002, at 05:27  PM, Richard A. O'Keefe wrote:
 > 
 > > Does any existing Smalltalk actually have number hashes that are
 > > consistent with #= *even between different classes*?
 > >
 > > From the fact that this problem seems to have been around for 20+ 
 > > years,
 > > I surmise that people _don't_ make a habit of using rational numbers
 > > (*Integer, Fraction) and Floats as keys in the same collections.
 > 
 > Here's another proposal: make Float>>= call #shouldNotImplement.
 > 
 > I wonder what, if anything, it would break?

Given the "Floating Point" discussion, is it possible that
Floats shouldn't be used as keys in collections?

Bryce



More information about the Squeak-dev mailing list