[r6rs-discuss] [Formal] Binary and string pseudo-transcoders should
die
cowan at ccil.org
cowan at ccil.org
Sun Feb 4 04:08:37 EST 2007
---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Submitter: John Cowan
Email address: cowan at ccil.org
Issue type: Defect
Priority: Minor
Component: I/O
Report version: 5.92
Summary: Binary and string pseudo-transcoders should die
Every R5.92RS port has a transcoder, which come in three flavors:
transcoders proper, which are attached to binary ports to make them into
textual ports; the binary transcoder, which does nothing except stand
in for a transcoder on a binary port; and the implementation-defined
transcoder provided for string ports. The latter two flavors are not
really transcoders, for they don't provide any transcoding functions.
I propose, therefore, that they be dropped.
The binary-transcoder procedure is no longer required, and #f is returned
by the port-transcoder procedure when applied to a binary port or a
string port.
In (I believe) all cases where the binary transcoder is referred to, it
can simply be dropped. The exception is the open-file-*-port procedures,
where a binary file can be opened only by explicitly specifying the binary
transcoder. This is inconsistent with other kinds of port constructors,
and I propose one of two resolutions:
A: If the transcoder is omitted, return a binary port. In order to create
a port with "native" transcoding, introduce a procedure native-transcoder,
which returns an implementation-dependent transcoder.
B: Allow #f as an explicit argument to open-file-*-port procedures to
return a binary port.
I prefer A.
--
Overhead, without any fuss, the stars were going out.
--Arthur C. Clarke, "The Nine Billion Names of God"
John Cowan <cowan at ccil.org>
More information about the r6rs-discuss
mailing list