[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `lazy-catch' and `dynamic-wind'
From: |
Ludovic Courtès |
Subject: |
Re: `lazy-catch' and `dynamic-wind' |
Date: |
Sun, 23 Nov 2008 23:56:40 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Hi Neil,
"Neil Jerram" <address@hidden> writes:
> This is as expected. Note that there is nothing like dynamic-wind
> inside fluid-set! Did you perhaps mean with-fluids instead? If you
> used with-fluids, I would expect the same behaviour as you've
> described for parameterize.
Yes, that comparison to native fluids was inappropriate.
> That text is misleading and should be improved. See the manual
> section [1] for the whole story, which explains that it is actually
> only the call stack that is not unwound.
>
> [1]
> http://www.gnu.org/software/guile/manual/html_node/Lazy-Catch.html#Lazy-Catch
>
> This is why I invented with-throw-handler and the optional
> pre-unwind-handler parameter of `catch'. Perhaps you need to use one
> of those instead.
Exactly, thanks! Now, I was actually using SRFI-34's
`with-exception-handler', which I expected to behave like
`with-throw-handler'. Should we change `with-exception-handler' to use
`with-throw-handler' instead of `lazy-catch'?
(In fact, I don't understand when the `lazy-catch' semantics could be
preferable over the `with-throw-handler' semantics'.)
Thanks,
Ludo'.