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.

Ticket 372: Formal Comment: (exit #t) should be the same as (exit)

2012-10-12 03:02:49
WG1 - Core
cowan
major
cowan
fixed
source
closed
2012-03-29 04:59:48
defect

Submitter's Name: Alan Watson Submitter's Email Address: alan at alan-watson dot org Draft Version of Report: 6 Section of draft R7RS: 6.13.4 System interface

The draft R7RS follows the R6RS in specifying that (exit) is a normal exit, specifying that (exit #f) is an abnormal exit, and leaving the interpretation of arguments other than #f to the implementation.

I suggest that the R7RS should specify that (exit #t) is identical to (exit). (Perhaps it would be clearer to state that (exit #t) is a normal exit and (exit) is identical to (exit #t)).

This allows the exit status to be handled more uniformly by code which might exit normally or abnormally. For example, in a compiler it is often useful to continue after a syntax error, but in this case one still wants to indicate an abnormal exit. If (exit #t) is specified as above, one simply has to keep track of whether an error has occurred in a boolean variable and then:

(exit (not error-occurred))

rather than the more cumbersome:

(if error-occurred (exit #f) (exit))
summaryFormal Comment:Formal Comment: (exit #t) should be the same as (exit)
owneralexshinncowan
statusnewaccepted
resolutionfixed
statusacceptedclosed