GNU bug report logs -
#47677
[PATCH] condition-case success continuation
Previous Next
Reported by: Mattias Engdegård <mattiase <at> acm.org>
Date: Fri, 9 Apr 2021 20:28:02 UTC
Severity: wishlist
Tags: patch
Done: Mattias Engdegård <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 47677 <at> debbugs.gnu.org (full text, mbox):
13 apr. 2021 kl. 09.38 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:
>> ((:catch TAG) BODY...)
>
> I'm not quite sure I understand the use case for this -- we already have
> a general catch/throw infrastructure, so this sounds like a somewhat odd
> addition.
Oh, it was just proof-of-concept code to show that such a generalisation would be possible should it be desired later. It's not part of the immediate proposal. Sorry about the confusion.
Our present `catch` has the same flaw as `condition-case` in that it does not give access to the success continuation, leading to hacks similar to the one you mentioned. We could extend `catch` instead, maybe like this:
(catch TAG :in BODY-FORM :success VAR SUCCESS-FORM)
but what if you want to catch multiple tags, or both throws and errors? The constructs don't compose; nesting them hides the success continuation of the inner forms.
This bug report was last modified 4 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.