Add make-eof-object procedure
|Reported by:||cowan||Owned by:||cowan|
|Component:||WG1 - Core||Keywords:|
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)
Change History (4)
comment:3 Changed 5 years ago by cowan
- Owner changed from alexshinn to cowan
- Status changed from decided to writing