[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Post-plebiscite issue #3: structure-sharing for mapping
- To: will@x
- Subject: Re: [Scheme-reports] Post-plebiscite issue #3: structure-sharing for mapping
- From: John Cowan <cowan@x>
- Date: Sun, 12 May 2013 19:40:33 -0400
- Cc: scheme-reports <scheme-reports@x>
- In-reply-to: <9477480.1946891368389490933.JavaMail.root@zimbra>
- References: <23182326.1946811368389348253.JavaMail.root@zimbra> <9477480.1946891368389490933.JavaMail.root@zimbra>
> > 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.
It's not there, no. But no one has ever supposed that it should be
otherwise; it's just that going back to R4RS and probably earlier, we
have had some definitions that are technically incorrect. For example,
R4RS defined `reverse` thus: "Returns a newly allocated list consisting
of the elements of list in reverse order." Taken literally, that would
mean that (reverse '()) would have to return a newly allocated empty list.
The language that excludes this, like other purely editorial matters, has
been added to the draft-10 branch directly. As part of the publication
process, I'll provide a list of such editorial fixes.
> 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.
That change was made by me back in November as part of draft 8, but I
no longer have any idea why. I'll file a ticket for it.
> Indeed, it contradicts several examples within the ninth draft of the
> R7RS, which means the ninth draft is contradicting itself on this point.
Can you particularize here?
> 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?
Well, I didn't say "reflexive", and surely it is transitive iff it is
reflexive. But "reflexive" means "returns #t if both arguments are the
same", but if this predicate is the very definition of "the same", then
that's either meaningless or tautologous.
> If you think those examples are compatible with reflexivity, then I'd like
> to hear your interpretation of those examples.
Well, I suppose that means that in such an implementation `2` can't be
identified solely with the number 2, because it has a hidden property
distinguishing it from some other `2`. Mathematically this is bad, but
`eq?` is not mathematical.
"How terribly confusing," he [the Dodecahedron] cried. "Everything
here is called exactly what it is. The triangles are called
triangles, the circles are called circles, and even the same
numbers have the same name. Why, can you imagine what would happen
if we named all the twos Henry or George or Robert or John or lots
of other things? You'd have to say Robert plus John equals four,
and if the four's name were Albert, things would be hopeless."
--Norton Juster, _The Phantom Tollbooth_
Perhaps we can say that in such an implementation `eq?` distinguishes
not one number 2 from another, but one _numeral_ 2 from another.
The Imperials are decadent, 300 pound John Cowan <cowan@x>
free-range chickens (except they have http://www.ccil.org/~cowan
teeth, arms instead of wings, and
dinosaurlike tails). --Elyse Grasso
Scheme-reports mailing list