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 337: Add make-eof-object procedure

2012-10-07 04:01:37
WG1 - Core
cowan
major
cowan
fixed
source
closed
2012-01-22 02:15:42
defect

make-eof-object returns an object which answers #t to eof-object?.

From Vincent Manis:

This isn't just an attempt to create a vain orthogonality; there are good reasons why arbitrary code might wish to return an eof object. For example, a DBMS interface might have a routine that returns one row, as a list or a vector, at a time; after the last, it is perfectly reasonable to return an eof object.

An argument against providing this is that the constructor may be trivially written, as shown [below]. A similar argument could be applied to zero?, newline, quotient, remainder, and modulo, among others. R7RS is not afraid to provide easy-to-implement procedures in the name of simplicity, orthogonality, or historical compatibility. I think the lack of an eof constructor is worth remedying.

(let* ((p (open-input-string "")) (x (read p))) (close-port p) x)

<xacc.ide@gmail.com> points out that R6RS calls this procedure eof-object, not make-eof-object, and suggests that we use that name.

statusnewdecided

The WG voted to adopt this proposal using the name eof-object.

owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed