Re: [Scheme-reports] Procedural equivalence: the last debate John Cowan 09 Jun 2013 05:48 UTC

Arthur A. Gleckler scripsit:

>   The eqv? procedure returns #t if... obj1 and obj2 are procedures whose
>   location tags are equal.
>
>   The eqv? procedure returns #f if... obj1 and obj2 are procedures
>   that would behave differently (return different value(s) or have
>   different side effects) for some arguments.
>
>   The above definition of eqv? allows implementations latitude in
>   their treatment of procedures and literals: implementations are free
>   either to detect or to fail to detect that two procedures or two
>   literals are equivalent to each other, and can decide whether or not
>   to merge representations of equivalent objects by using the same
>   pointer or bit pattern to represent both.

+1

>   Eq? and eqv? are guaranteed to have the same behavior on symbols,
>   booleans, the empty list, pairs, procedures, and non-empty strings
>   and vectors.

+1, with the addition of records after pairs and bytevectors after vectors.

--
John Cowan  cowan@ccil.org  http://www.ccil.org/~cowan
Does anybody want any flotsam? / I've gotsam.
Does anybody want any jetsam? / I can getsam.
        --Ogden Nash, No Doctors Today, Thank You