[r6rs-discuss] [Formal] Correct I/O Interface Inconsistencies
Michael Sperber
sperber at informatik.uni-tuebingen.de
Mon Nov 20 04:19:30 EST 2006
[Not speaking for the editors, as usual.]
MichaelL at frogware.com writes:
> * In 15.3.6 (Output ports) there's call-with-bytes-output-port and
> call-with-string-output-port, but in 15.3.5 (Input ports) there's no
> corresponding call-with-bytes-input-port and call-with-string-input-port.
Indeed. That's because input and output are not symmetric, especially
for strings and bytes objects.
> * In 15.3.6 (Output ports) and 15.3.5 (Input ports) there's no
> call-with-file-output-port or call-with-file-input-port (respectively).
This isn't needed, as there is `call-with-port'. Providing all
combinations of `call-with-port' with individual kinds of ports would
be redundant and ultimately futile.
> * In 15.4 (Simple I/O) there's call-with-input-file and
> call-with-output-file and with-input-from-file and with-output-to-file.
Yes; this is for compatibility with R5RS. But see above.
Historical comment: The change of replacing
`call-with-{input,output}-file' by `call-with-port' goes back to the
discussion at the 1998 post-R5RS workshop.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the r6rs-discuss
mailing list