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

Re: [Scheme-reports] [scheme-reports-wg1] Digest for scheme-reports-wg1@x - 13 Messages in 5 Topics

> I expect, if two variables are eq? , that mutation of one has as a
> side effect mutation of the other; thus the two variables remain
> eq?

I agree.

> Conversely, I expect, if two variables are eqv? but not eq?, that
> mutation of one will not have a side effect of mutating the other,
> thus the two variables will not remain eqv?

Ah, interesting. My intuition has always been that if two values are
eqv? but not eq?, then they are values that cannot be mutated, like
big integers or multibyte characters or something like that. This
seems to be a clear difference.

I thought of eqv? and eq? as being a performance tradeoff. eq? was the
fast one (since, as you say, it can be implemented as a bit-pattern
comparison), and eqv? handled the non-immediate atomics.


Scheme-reports mailing list