[plt-scheme] Another question: eq? and eqv?

From: Greg Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Fri Dec 30 20:11:59 EST 2005

--- Felix Klock's PLT scheme proxy <pltscheme at pnkfx.org> wrote:
> If you read section 6.1 of R5RS very carefully, you'll find that eq? 
> is allowed to discriminate between some objects that are otherwise  
> indistinquishable.  For example when a and b are numbers, (eq? a b)  
> might return false even if (= a b) returns true.  (eqv? a b) is meant
> to do the "right" thing in those cases.

Thanks. I got on the wrong track by thinking that immutable strings
that were equal? might be eqv? or even eq? (because if the object can't
change, both might point to the same object in memory). But that didn't
work. It's sensible that bignums that have the same value would not be

Gregory Woodhouse  <gregory.woodhouse at sbcglobal.net>
"Interaction is the mind-body problem of computing."
--Philip L. Wadler

Posted on the users mailing list.