[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(EQV? '(A) '(A))




    Why should non-constant-time behavior be desirable for numbers, but
    desirable for lists?  Immutable structured data with identical
    components are "operationally identical", and I'm endeavoring to make
    EQV? a close approximation to the operationally-identitical relation.

As far as I know = always terminates and is rather efficient (linear
in the size of the numbers in bits?).  You are suggesting that we make
EQV? work like EQUAL? on immutable lists, but this has a problem:

1) The fast, simple definition fails on circular structure.  Agreed
that there is no way in the standard to have immutable circular
structure, but this seems like a simple compatible extension which
people might want to make.  It would then be bad if EQV? were not to
terminate on immutable objects.

2) The only implementations of EQUAL? which handle circular structure
correctly that I know of are very expensive (much worse than linear).
This would make EQV? unusable in many cases, but we are trying to
encourage its use over EQ?.

I'm not saying I necessarily disagree with your suggestion, but I need
more time to think about it before I agree.

PS: If you have an efficient implementation of EQUAL? which handles
circular structure, I would appreciate your sending it to me.