[r6rs-discuss] Why is (eqv? g g) unspecified when g is a procedure?
cowan at mercury.ccil.org
Tue Jul 17 21:15:37 EDT 2012
will at ccs.neu.edu scripsit:
> > Different definitions for different contexts. SML equality has ad-hoc
> > polymorphism; Scheme `eqv?` has universal polymorphism.
> That's news to me. Which of the Scheme reports/standards do you wish
> to cite as your source?
Any of them will do: given two values x, y, `(eqv? x y)` answers either
#t or #f. This is not the case in SML, where values cannot be compared
unless they have the same type, and only certain types can be compared
for equality at all.
> And how do you reconcile your just-so story with the change made long
> ago, when both (eqv? (vector) (vector)) and (eqv? (string) (string))
> were required to return true?
I don't understand the relevance of this question.
> > In SML, almost
> > everything is immutable, and Leibniz's criterion doesn't apply.
> In Scheme, procedures have never been immutable (although they can
> refer to mutable objects), so I guess Leibniz's criterion doesn't
> apply to procedures.
I suppose you mean "have never been mutable". But Leibniz's criterion is
that identical objects are indiscernible rather than that indiscernible
objects are identical, so I ought not to have referred to it.
John Cowan http://www.ccil.org/~cowan cowan at ccil.org
if if = then then then = else else else = if;
More information about the r6rs-discuss