John Cowan wrote:
> There has never been any question of *requiring* `map` and friends to do
> structure-sharing, only of whether it should be explicitly permitted or
> merely (as is now the case) implicitly permitted.
Understood. What I was worried about was that you might require
the result to be newly allocated. That would (in some cases) be
incompatible with IEEE 1178, the R5RS, and the R6RS.
> On the opposite side of the issue, the editorial team has added language
> to the storage model (section 3.4) clarifying that "newly allocated" objects
> that have no locations may not, and in the case of the empty list, must not,
> actually be newly allocated.
I don't see that language in the ninth draft.
I do, however, see the change from "equivalent in the sense of eqv?"
to "operationally equivalent". That's a significant change from the
semantics described in the R5RS and R6RS. It also contradicts several
explicit examples found in both the R5RS and R6RS.
Indeed, it contradicts several examples within the ninth draft of the
R7RS, which means the ninth draft is contradicting itself on this point.
> In fact, `eqv?` in both R7RS and R5RS is permitted to return either
> #t or #f to (eqv? "" "") and (eqv? '#() '#()), as the examples show.
You're right! My mistake. It was the R3RS that required (eqv? "" "")
and similar to evaluate true, but the R4RS eliminated that requirement.
I had forgotten about that liberalization.
> It's permitted and reasonable, but not actually a standards requirement,
> to make `eq?` distinguish such objects and `eqv?` identify them.
Yes. My post was a plea to continue to allow that reasonable behavior.
> > In my opinion, the R5RS, R6RS, and R7RS draft 9 all err when they say eq? is
> > an equivalence predicate without alluding to the restricted domain of values
> > for which it is an equivalence predicate.
>
> I don't understand the force of this remark. After all, neither `eq?` nor
> `eqv?` do what you expect on arbitrary procedures, and both of them are
> total, always return a boolean, symmetric, transitive, and respect the
> indiscernibility of identicals (if not always the identity of indiscernibles).
> What definition of "equivalence predicate" are you using that applies to
> `eqv?` but not to `eq?` as specified in R5RS?
How do you know eq? is transitive on numbers or characters? The R5RS says
its "behavior on numbers and characters is implementation-dependent" subject
to two conditions. Those two conditions do not imply transitivity.
How do you know eq? is even reflexive? The R5RS says the results of these
specific examples are unspecified:
(eq? 2 2)
(let ((n (+ 2 3)))
(eq? n n))
If you think those examples are compatible with reflexivity, then I'd like
to hear your interpretation of those examples.
Will
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports