Finally clauses Tony Garnock-Jones (09 Aug 2002 14:05 UTC)
Re: Finally clauses Dave Mason (09 Aug 2002 14:58 UTC)
Re: Finally clauses Richard Kelsey (09 Aug 2002 23:28 UTC)
Re: Finally clauses Tony Garnock-Jones (12 Aug 2002 11:24 UTC)
Re: Finally clauses Richard Kelsey (13 Aug 2002 00:48 UTC)
Re: Finally clauses Tony Garnock-Jones (13 Aug 2002 17:35 UTC)
Re: Finally clauses Richard Kelsey (15 Aug 2002 01:47 UTC)
Re: Finally clauses Tony Garnock-Jones (15 Aug 2002 11:11 UTC)
Re: Finally clauses bear (15 Aug 2002 15:19 UTC)
Re: Finally clauses sperber@xxxxxx (29 Aug 2002 08:08 UTC)
Re: Finally clauses bear (01 Sep 2002 20:55 UTC)
Re: Finally clauses Richard Kelsey (01 Sep 2002 22:22 UTC)
Re: Finally clauses bear (04 Sep 2002 03:07 UTC)
Re: Finally clauses Richard Kelsey (04 Sep 2002 06:55 UTC)

Re: Finally clauses Richard Kelsey 15 Aug 2002 01:46 UTC

   Date: Tue, 13 Aug 2002 18:40:54 +0100
   From: Tony Garnock-Jones <xxxxxx@eservglobal.com>

   But "finally" isn't dealing with cleaning up on
   stack-unwinding - it's dealing with cleaning up on exception-raising
   (which doesn't involve any stack-unwinding at all, unless an
   individual exception-handler procedure decides to do a throw to a
   different dynamic environment).

It doesn't make sense to me to have "finally" clean up when an
exception is raised and no stack unwinding occurs.  Suppose we
build continuable exceptions on top of SRFI-34 and add
   (finally <exp> <body>)
that evaluates <exp> whenever an exception is raised in <body>
and when <body> returns. Then if we write

        (with-handler (lambda (c)
                        (if (continuable? c)
                            (continue c 10)
                            (raise c)))
            (finally (begin (display "exiting") (newline))
              (raise (make-continuable-exception))))

it will write "exiting" twice, once for the raise and once
for the normal return.  When would you use such a "finally"?

                                   -Richard