[r6rs-discuss] [Formal] The standard-*-port procedures should return a fresh binary port

From: Per Bothner <per>
Date: Thu Feb 8 20:31:44 2007

John Cowan wrote:
> Currently, the procedures standard-input-port, standard-output-port,
> and standard-error-port are very vague. One does not know if one will
> get a binary or a textual port, though a textual port is encouraged;
> one does not know if it is safe to close the port or not.
>
> I suggest that the definition be firmed up: the port returned must
> be fresh and binary.

How do you see the relationship between (current-output-port)
and (standard-output-port)?

If as currently specified we have that (current-output-port)
is initially bound to (standard-output-port), then you have the
problem that you've just broken "hello world":
   (display "hello world")

We really don't people to have to deal with transducers just
to write hello-world-level programs.

One possible approach is that (current-output-port) gets
lazily initialized to a textual stream bound to (standard-output-port),
on first use.
-- 
	--Per Bothner
per_at_bothner.com   http://per.bothner.com/
Received on Thu Feb 08 2007 - 20:33:01 UTC

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