Incongruent hash
Christopher Oliver
oliver at fritz.co.traverse.com
Sun Feb 8 21:43:37 UTC 1998
> Luciano Notarfancesco told me this bug:
>
> 1 = 1.0 true
> but
> 1 hash = 1.0 hash false
I really do not know how to feel about this. I just read through the
Purple Book and the draft std, and I understand what you mean. How-
ever, this hits me as a problem in types. The first statement is true
only by coercion. Should a programmer really expect hash to be invar-
iant across coercions between types?
My brief exposure to numerical computation suggests this to be in the
realm of curiosity rather than a serious matter. Use of equality where
floats are concerned is dangerous practice.
--
Christopher Oliver Traverse Communications
Systems Coordinator 223 Grandview Pkwy, Suite 108
oliver at traverse.com Traverse City, Michigan, 49684
(define magic (lambda (f) (lambda (x) x)))
(define (more-magic n) (lambda (f) (lambda (x) (f ((n f) x)))))
More information about the Squeak-dev
mailing list
|