[Scheme-reports] get-output-string on closed ports William D Clinger (30 Jan 2015 15:29 UTC)
Re: [Scheme-reports] get-output-string on closed ports taylanbayirli@gmail.com (30 Jan 2015 21:18 UTC)
Re: [Scheme-reports] get-output-string on closed ports cowan@ccil.org (30 Jan 2015 21:55 UTC)

Re: [Scheme-reports] get-output-string on closed ports taylanbayirli@gmail.com 30 Jan 2015 21:14 UTC

William D Clinger <will@ccs.neu.edu> writes:

> Please [make it an error].  Reading from or writing to a closed port
> should always be an error.

Is using `get-output-string' really "reading" from the port?

As Ray Dillinger pointed out, there is a more general mismatch between
the APIs of file ports and string ports, and as Michael Montague pointed
out, this seems to lead to usages of `get-output-string' on closed
string ports to be desirable.  Therefore I would see `get-output-string'
as a special-case and not expect it to conform to typical expectations
on a port API.

Taylan

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