Subject: Re: bug#47677: [PATCH] condition-case success continuation

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 14 Apr 2021 11:29:21 +0200

Mattias Engdegård <[email-masked]> writes:

> 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.

Oh, OK.  :-)

> 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.

Yes, that's true.

> 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.

Yeah, I think extending `catch' here would be less than optimal, but I
don't really have any suggestions here -- I use `throw/catch' so little
that I have no gut feeling about what I see as being useful.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no