This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.
Source for ticket #155
cc
changetime
2012-10-05 12:11:08
component
WG1 - Core
description
Allowing examples like these will make code-walkers (including compilers and interpreters) excessively complicated:
#1=(begin (display #\x) . #1#)
(lambda #2=(a b c #2#) ...)
(+ . #3=(1 2 3 . #3#))
id
155
keywords
milestone
owner
alexshinn
priority
major
reporter
cowan
resolution
fixed
severity
status
closed
summary
Make recursively defined code an explicit error
time
2011-04-17 02:26:51
type
defect
Changes
Change at time 2012-10-05 12:11:08
author
cowan
field
comment
newvalue
oldvalue
8
raw-time
1349413868772334
ticket
155
time
2012-10-05 12:11:08
Change at time 2012-10-05 12:11:08
author
cowan
field
resolution
newvalue
fixed
oldvalue
raw-time
1349413868772334
ticket
155
time
2012-10-05 12:11:08
Change at time 2012-10-05 12:11:08
author
cowan
field
status
newvalue
closed
oldvalue
writing
raw-time
1349413868772334
ticket
155
time
2012-10-05 12:11:08
Change at time 2011-07-18 18:00:04
author
alexshinn
field
comment
newvalue
oldvalue
7
raw-time
1310986804000000
ticket
155
time
2011-07-18 18:00:04
Change at time 2011-07-18 18:00:04
author
alexshinn
field
status
newvalue
writing
oldvalue
decided
raw-time
1310986804000000
ticket
155
time
2011-07-18 18:00:04
Change at time 2011-07-10 18:13:04
author
alexshinn
field
comment
newvalue
We voted to note this is an error.
oldvalue
6
raw-time
1310296384000000
ticket
155
time
2011-07-10 18:13:04
Change at time 2011-07-10 18:13:04
author
alexshinn
field
resolution
newvalue
oldvalue
raw-time
1310296384000000
ticket
155
time
2011-07-10 18:13:04
Change at time 2011-07-10 18:13:04
author
alexshinn
field
status
newvalue
decided
oldvalue
new
raw-time
1310296384000000
ticket
155
time
2011-07-10 18:13:04
Change at time 2011-04-18 07:24:47
author
arcfide
field
comment
newvalue
It is possible to construct this situation in current implementations of R5RS and R6RS, so how do code walkers handle this situation currently? It is trivial to handle this situation in a code walker by not-terminating; is this incorrect behavior? What is the current practice when dealing with these forms today? Do any of them consider this to be an explicit or implicit error situation? Neither R5RS nor R6RS handle this explicitly to my knowledge, is it worth it for us to do so? Why complicate the language with this? I don't think it is worth it and I don't think it buys us anything.
oldvalue
5
raw-time
1303086287000000
ticket
155
time
2011-04-18 07:24:47
Change at time 2011-04-17 07:11:45
author
cowan
field
comment
newvalue
If it's a meaningful extension in some Schemes, then (as I said) code-walkers have to accommodate it.
oldvalue
4
raw-time
1302999105000000
ticket
155
time
2011-04-17 07:11:45
Change at time 2011-04-17 05:01:23
author
arcfide
field
comment
newvalue
Do we really want this to be considered an error at all? I could imagine writing a program that used such a chain, though I cannot think, at the moment why I would do that. My point is basically, does it really hurt anything to let implementation apply a reasonable semantics to it if they can find one? I like unspecified better.
oldvalue
3
raw-time
1302991283000000
ticket
155
time
2011-04-17 05:01:23
Change at time 2011-04-17 04:56:39
author
cowan
field
comment
newvalue
I'm not proposing that an error be ''signaled''. It's simply that code like the above is incorrect: you can't rely on it doing something in particular, never mind "the obvious thing". That is what "is an error" means in the Scheme standard.
oldvalue
2
raw-time
1302990999000000
ticket
155
time
2011-04-17 04:56:39
Change at time 2011-04-17 04:36:04
author
arcfide
field
comment
newvalue
My initial thoughts are, why? We already have non-terminating expansion, and at least one major Scheme implementation handles this by looping forever. I would think that detecting the loop is more expensive than just letting an implementation loop.
Doing this would complicate the expander, and I wonder if this is worth it. What do existing Schemes say about it?
oldvalue
1
raw-time
1302989764000000
ticket
155
time
2011-04-17 04:36:04