On Fri, Feb 6, 2015 at 3:44 PM, leppie <[email protected]> wrote: > Just to pitch in. > > get-output-string is only applicable on string output ports. Calling it on > any other port, is an error. > It is up to the implementer to decide whether calling close-port on a > string port should do something or nothing. >
Closing the port should _always_ make further I/O an error. The way R6RS handles this, prevents one from having to expose a potentially > leaky abstraction as in SRFI 6. > I'm not sure what you mean by leaky here. I personally prefer the R6RS API, partly because the question of get-output-string on non-string ports becomes a non-issue, and partly because once you introduce custom ports, then string ports can just be a library function. But that's completely orthogonal to the discussion, and R6RS has the same issue: calling the get-output-string procedure on a closed port is unspecified. -- Alex
_______________________________________________ Scheme-reports mailing list [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
