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

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 25 Apr 2021 18:45:31 +0200

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

>   (condition-case x
>       (throw 'meep 2)
>     ((:catch 'meep) (+ x 3)))
>   => 5
>
> Multiple catch and error handlers can be mixed freely in the same
> `condition-case` form, which can also include a :success clause.

Sorry; I'm not very enthusiastic about this construct -- it just seems
like an awkward hack to me.

condition-case is about handling errors -- it can be used as a general
flow control system, but that's an awkward fit.  It conveys intention.
So I don't think we should extend it to handle more throw/catch-like
things.

However, I do agree that Emacs Lisp could need some beefing up in the
"early return" department (which this is a kind of example of), but I
don't know what that would look like.  But I don't think it should look
like this.

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