Proposed erratum 27: quoted literal identifiers are symbols

12 views
Skip to first unread message

John Cowan

unread,
Jun 26, 2016, 10:22:00 PM6/26/16
to scheme-re...@googlegroups.com, scheme-re...@googlegroups.com
Taylan Ulrich Bayırlı/Kammer scripsit:

> I wonder if R7RS should be amended to actually specify that despite
> identifiers being "in effect renamed," that they carry on their original
> identity for purposes of treatment as a literal rather than as a
> variable or syntax keyword reference?

I don't think it's absolutely necessary, but I think it's a good idea.

> That would be a different topic, though.

Hence the change in subject line and the inclusion of WG1.
I've added this as proposed erratum 27. Erratum 26 is reserved
in case we need it for field names.

Does anyone object to this?

--
John Cowan http://www.ccil.org/~cowan co...@ccil.org
"Make a case, man; you're full of naked assertions, just like Nietzsche."
"Oh, i suffer from that, too. But you know, naked assertions or GTFO."
--heard on #scheme, sorta

John Cowan

unread,
Jun 27, 2016, 3:59:22 PM6/27/16
to Taylan Ulrich Bayırlı/Kammer, Marc Nieper-Wißkirchen, scheme-reports-wg2, scheme-re...@googlegroups.com
Taylan Ulrich Bayırlı/Kammer scripsit:

> Where can I see proposed errata? 26 and 27 are not at:
> http://trac.sacrideo.us/wg/wiki/R7RSSmallErrata

I decided not to make the change pending possible expansion of the places
to be changed.
"Repeat this until 'update-mounts -v' shows no updates.
You may well have to log in to particular machines, hunt down
people who still have processes running, and kill them."

Alex Shinn

unread,
Jun 27, 2016, 11:20:28 PM6/27/16
to scheme-re...@googlegroups.com, scheme-re...@googlegroups.com, John Cowan
On Mon, Jun 27, 2016 at 11:03 PM, Marc Nieper-Wißkirchen
<marc....@gmail.com> wrote:
>
> If this change is added to the language, another change will have to be made
> in section 4.2.1: One would have to add that in each datum of a case-clause,
> each renamed identifier retains its original spelling as if it was quoted.
> Otherwise, the sample implementation of the case syntax given in the
> appendix would be wrong.

The sample implementation given in the appendix uses `quote',
so it will have the same semantics as quote whether you want
it to or not, and nothing need be said about `case'.

If I understand, the errata is to clarify only one thing, that:

(eq? 'foo (string->symbol "foo"))

is always true. In other words, regardless of whatever renaming
may be going on, a quoted value (even quoted indirectly through
macro expansion) will always evaluate to the original symbol
written in the source. _How_ it guarantees this is not relevant.

But equivalents to this example are already in the spec, and if
this were not already true the language would be quite broken.
Do we really need to say anything?

--
Alex

John Cowan

unread,
Jun 27, 2016, 11:24:11 PM6/27/16
to Alex Shinn, scheme-re...@googlegroups.com, scheme-re...@googlegroups.com
Alex Shinn scripsit:

> If I understand, the errata is to clarify only one thing, that:
>
> (eq? 'foo (string->symbol "foo"))
>
> is always true. In other words, regardless of whatever renaming
> may be going on, a quoted value (even quoted indirectly through
> macro expansion) will always evaluate to the original symbol
> written in the source. _How_ it guarantees this is not relevant.

Just so.

> But equivalents to this example are already in the spec, and if
> this were not already true the language would be quite broken.
> Do we really need to say anything?

As I said before: not essential, but a good idea to promote clarity.

--
My .sigs are from my large and miscellaneous reading both on and off the net.
Occasionally I hear one viva voce or make one up (without attribution,
of course). I try to stay within the McQuary limit, but sometimes fail,
as in this case. In general, the quotes are chosen at random by a script
from <http://www.ccil.org/~cowan/signatures>, but sometimes I choose one
on purpose. I've been collecting and using them for 30+ years.
Reply all
Reply to author
Forward
0 new messages