[Scheme-reports] Fwd: Comments on draft 6 about call/cc Alex Shinn (20 Feb 2012 07:37 UTC)
Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc Alaric Snell-Pym (20 Feb 2012 10:32 UTC)
Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc Jussi Piitulainen (20 Feb 2012 11:15 UTC)
Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc John Cowan (24 Feb 2012 06:36 UTC)
Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc Jussi Piitulainen (22 Feb 2012 11:10 UTC)
Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc Alaric Snell-Pym (20 Feb 2012 12:49 UTC)
Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc Perry E. Metzger (20 Feb 2012 18:57 UTC)

Re: [Scheme-reports] Fwd: Comments on draft 6 about call/cc John Cowan 24 Feb 2012 06:35 UTC

Andy Wingo scripsit:

> What's wrong with something like this?
>
>   (define (call-with-input-file filename proc)
>     (let ((port (open-input-file filename)))
>       (with-exception-handler
>         (lambda (x)
>           (close-input-port port)
>           x)
>         (lambda ()
>           (call-with-values (lambda () (proc port))
>             (lambda vals
>               (close-input-port port)
>               (apply values vals)))))))

What happens when the body procedure calls raise-continuable?  When the
exception handler returns, the port has been closed, but the body will
crank on, presumably throwing a non-continuable exception when an attempt
is made to read from the closed port.

--
John Cowan  cowan@ccil.org   http://ccil.org/~cowan
Consider the matter of Analytic Philosophy.  Dennett and Bennett are well-known.
Dennett rarely or never cites Bennett, so Bennett rarely or never cites Dennett.
There is also one Dummett.  By their works shall ye know them.  However, just as
no trinities have fourth persons (Zeppo Marx notwithstanding), Bummett is hardly
known by his works.  Indeed, Bummett does not exist.  It is part of the function
of this and other e-mail messages, therefore, to do what they can to create him.

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