From: "Neil Jerram" <neiljerram@googlemail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-user@gnu.org
Subject: Re: `lazy-catch' and `dynamic-wind'
Date: Sun, 23 Nov 2008 23:25:36 +0000 [thread overview]
Message-ID: <49dd78620811231525h50cf6c7fs106ced6ac6518e03@mail.gmail.com> (raw)
In-Reply-To: <87d4gm59w7.fsf@gnu.org>
2008/11/23 Ludovic Courtès <ludo@gnu.org>:
>
> 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'?
Yes, I think we should, since SRFI-34 says that "The handler is called
in the dynamic environment of the call to raise, except that the
current exception handler is that in place for the call to
with-exception-handler that installed the handler being called."
(I recall now being aware of this as a discrepancy at the time I wrote
(srfi srfi-34) using lazy-catch; but I let it slip because we didn't
have with-throw-handler at that time, and because none of the SRFI-34
reference test cases at that time differentiated between unwinding or
not unwinding the dynamic context, hence the lazy-catch implemented
passed all of those cases.)
Could you make that change?
> (In fact, I don't understand when the `lazy-catch' semantics could be
> preferable over the `with-throw-handler' semantics'.)
I agree. To be fair, there is a slight messiness in the
with-throw-handler semantics, because of the handler context being
unwound before the handler is called, but there is a lot more
messiness in the lazy-catch semantics.
Regards,
Neil
next prev parent reply other threads:[~2008-11-23 23:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 17:25 `lazy-catch' and `dynamic-wind' Ludovic Courtès
2008-11-23 21:34 ` Neil Jerram
2008-11-23 22:56 ` Ludovic Courtès
2008-11-23 23:25 ` Neil Jerram [this message]
2008-11-24 8:43 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49dd78620811231525h50cf6c7fs106ced6ac6518e03@mail.gmail.com \
--to=neiljerram@googlemail.com \
--cc=guile-user@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).