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

Per Bothner per at bothner.com
Thu Feb 8 20:33:01 EST 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/



More information about the r6rs-discuss mailing list