[Larceny-users] Ports' type changes unexpectedly

Derick Eddington derick.eddington at gmail.com
Thu Mar 19 18:35:30 EDT 2009


On Thu, 2009-03-19 at 15:21 -0700, Derick Eddington wrote:
> flush-output-port "flushes any buffered output from the buffer of
> output-port to the underlying file, device, or object."  If a closed
> port, which is still an output port, is given, I think it's clear it's
> unspecified what happens.  If there's no longer buffered output or a
> buffer, then there can't be "any buffered output" or "the buffer" so
> there's nothing for the procedure to do.  If there's no longer an
> underlying file, device, or object, then there can't be "the file,
> device, or object" so there's nothing for the procedure to do.  If those
> things still exist and the procedure attempts to flush, I think it's
> clear an &i/o-write exception is raised, because it's for "write errors
> that occurred during an I/O operation", because a closed output port is
> "incapable of delivering ... data".

Actually, I don't think an &i/o-write exception is appropriate because
it's for write errors which occur *during* an I/O operation, and a
closed port cannot begin an I/O operation.  I think an &assertion
exception is appropriate.  But I can't hold implementations of R6RS to
that.

-- 
: Derick
----------------------------------------------------------------




More information about the Larceny-users mailing list