[r6rs-discuss] eqv? seems unwell

From: Alan Watson <alan>
Date: Wed, 27 Jun 2007 18:02:54 -0500

The description of eqv? in section 11.5 says:

"Moreover, if (eqv? obj1 obj2) returns #t, then obj1 and obj2 behave the
same when passed as arguments to any procedure that can be written as a
finite composition of Scheme?s standard procedures."

This is a significant change from the R5RS. I know of at least two R5RS
implementations in which the following need not evaluate to #t:

   (let* ((x 1.0)
          (foo (lambda (y) (eq? x y)))
          (obj1 x)
          (obj2 x))
     (eqv? (foo obj1) (foo obj2)))

Thus, obj1 and obj2 need not "behave the same" when passed to foo even
though (eqv? obj1 obj2) must return #t. (This can happen, for example,
if the implementation uses boxed inexacts and has a copying collector
that does not preserve eq?-ness for inexacts.)

More generally, I think this requirement implies that if (eqv? x y)
returns #t than (eq? x y) must also return #t. In that case, I'm not
sure if there is any difference between eq? and eqv?

Are the editors sure that this is what they want in the R6RS?

Regards,

Alan
Received on Wed Jun 27 2007 - 19:02:54 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC