[Top][All Lists]

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

Re: [PATCH 3/4] Work towards a more complete implementation of `(rnrs io

From: Ludovic Courtès
Subject: Re: [PATCH 3/4] Work towards a more complete implementation of `(rnrs io ports)'
Date: Wed, 24 Nov 2010 21:24:28 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)


Andreas Rottmann <address@hidden> writes:

> To quote that paragraph about `call-with-port':
> ,----
> | Proc must accept one argument. The call-with-port procedure calls proc
> | with port as an argument. If proc returns, port is closed automatically
> | and the values returned by proc are returned. If proc does not return,
> | port is not closed automatically, except perhaps when it is possible to
> | prove that port will never again be used for an input or output
> | operation.
> `----
> I interpreted that the way I did based on the question of what should
> happen when `proc' throws an exception (or otherwise invokes a
> continuation that makes it leave its current dynamic extent).  To me, it
> seems that in this case, `proc' does not _return_, and hence the port
> should not be closed.  Just to clarify, by a procedure "returning", I
> understand delivering a value (or values) to its continuation, which
> does not happen if the procedure invokes some arbitrary (other)
> continuation.

Oh, yes, makes sense to me now.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]