[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Scheme-reports] Question about R6RS standard-{input, output, error}-port



This is an R6RS question, not R7RS - though it might be relevant for
future standards.

R6RS specifies for (standard-output-port) and (standard-error-port)
that they:

"Returns a fresh binary output port connected to
the standard output or standard error respectively."

and similarly for (standard-input-port).

Why a *fresh* port?  When would it ever make sense to create
multiple distinct objects for (say) the standard output?

This isn't purely an academic question: I just checked in changes
to Kawa so the initial values of (current-{output,error}-port) are
hybrid textual/binary ports.  It is tempting to add Scheme access
to these ports using (standard-{output,error}-port), but I'm not
sure it would appropriate given that R6RS demands a fresh port
on each call.
-- 
	--Per Bothner
per@x   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports