[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
- To: Ray Dillinger <bear@x>
- Subject: Re: [Scheme-reports] [scheme-reports-wg1] Digest for scheme-reports-wg1@x - 13 Messages in 5 Topics
- From: Mark H Weaver <mhw@x>
- Date: Sun, 12 Aug 2012 12:03:20 -0400
- Cc: scheme-reports@x
- In-reply-to: <50272671.1040706@sonic.net>
- References: <0016e6d644a47d04bc04c6b59571@google.com> <CA+U71=M7ke_4896SUTrq2avfdhseNf_P726mdLMUEDUV1WqUBw@mail.gmail.com> <CAC_pKx-VYp48GBfUPUdD4bwxutr4B1r7Qw=EE2Ot5pGi_zi-EQ@mail.gmail.com> <CAMMPzYNk8a+A-s4RKR7Kx412urNjTYLWBTO-P_rk6eE=nB62XQ@mail.gmail.com> <CA+U71=MDbCYLHgAF=0Dk4sA1jRLP_GdA=5kNUNmg3Ns61hMN0Q@mail.gmail.com> <50272671.1040706@sonic.net>
On 08/11/2012 11:43 PM, Ray Dillinger wrote:
> 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?
I believe this is incorrect. If two mutable values are 'eqv?', then
they must denote the same locations. Can you provide an example of a
Scheme standard or major implementation that allows an exception this rule?
This rule is consistent with the R3RS definition of 'eqv?' as an
approximation to the operational equivalence relation. Specifically,
the R3RS allows 'eqv?' to return #true only when the values are known to
be operationally equivalent. In cases where operational equivalence
cannot be proved, it must return #false.
Two distinct mutable locations are never operationally equivalent,
regardless of what values they hold at a given time.
> I exclude from the above "intuitive" description of mutation on
> eq? values the case where the values are "immediate", a notion not
> defined in the standard but identifiable in the standard as the set of
> objects (including numbers and characters) on which the behavior of
> eq? itself is undefined.
Immediates cannot be mutable. Also, 'eq?' is defined on booleans and
the empty list, which are usually implemented as immediates. I suspect
the reason 'eq?' is not defined on numbers and characters is that
although a subset is often implemented as immediates, there is no
guarantee that all of them can be.
Mark
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports