[r6rs-discuss] [Formal] Correct I/O Interface Inconsistencies

From: Michael Sperber <sperber>
Date: Mon Nov 20 04:19:39 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
Received on Mon Nov 20 2006 - 04:19:30 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC