[r6rs-discuss] [Formal] Improve port i/o.

From: Per Bothner <per>
Date: Thu Nov 23 13:39:45 2006

Michael Sperber wrote:
> No. First of all, we're not even talking (yet) about non-Unicode
> encodings for the I/O system in the standard at all.

Some of are. Specifically, when an encoding is not explicitly
specified, then open-input-file and open-output-file return
ports that use a locale/implementation-dependent encoding, which
may be stateful and may require use an external library like iconv.

This is a requirement. Anything else is a non-starter.

>> A text file or network port is *inherently* layered on top of a byte
>> stream.
>
> I don't understand how that view relates to reality. On my hard drive
> or on the wire, there's just one data stream, one of bytes. Text is
> merely an interpretation of that data.

There may be some subtle difference between your statement and mine
but in practice they lead to the same result. A text stream is going
to be implemented as a layer on top of a byte stream.
-- 
	--Per Bothner
per_at_bothner.com   http://per.bothner.com/
Received on Thu Nov 23 2006 - 13:40:36 UTC

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