[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47677: [PATCH] condition-case success continuation
From: |
Richard Stallman |
Subject: |
bug#47677: [PATCH] condition-case success continuation |
Date: |
Fri, 23 Apr 2021 00:18:06 -0400 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> There's the business of fixing `catch` in the same way. (A new bug could be
opened for it, but since it's intimately related we might as well do it here.)
As mentioned, `catch` has three problems:
> - no way to execute code when a throw is caught
> - no way to execute code when the body terminates normally
> - no way to catch both throws and errors
I do not agree that these are problems. catch and throw are ok
as they are, and we should leave them alone.
catch is meant for intentional exits, and condition-case is meant for
catching errors. If you want to handle both in one place, use both
constructs there.
If you want to do something after catch catches a throw, it is not hard
to implement that using the existing constructs.
(if (catch 'foo
(prog1 nil
...do stuff...)) ;; use (throw 'foo t) to exit
do-if-throw
do-if-no-throw)
given how rarely this is used, it's as easy as it needs to be, and
avoids making catch complicated.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
- bug#47677: [PATCH] condition-case success continuation, (continued)
- bug#47677: [PATCH] condition-case success continuation, Stefan Monnier, 2021/04/12
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/12
- bug#47677: [PATCH] condition-case success continuation, Lars Ingebrigtsen, 2021/04/13
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/13
- bug#47677: [PATCH] condition-case success continuation, Lars Ingebrigtsen, 2021/04/14
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/15
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/16
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/16
- bug#47677: [PATCH] condition-case success continuation, Stefan Kangas, 2021/04/21
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/22
- bug#47677: [PATCH] condition-case success continuation,
Richard Stallman <=
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/24
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/25
- bug#47677: [PATCH] condition-case success continuation, Eli Zaretskii, 2021/04/25
- bug#47677: [External] : bug#47677: [PATCH] condition-case success continuation, Drew Adams, 2021/04/25
- bug#47677: [External] : bug#47677: [PATCH] condition-case success continuation, Eli Zaretskii, 2021/04/25
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/26
- bug#47677: [PATCH] condition-case success continuation, Eli Zaretskii, 2021/04/26
- bug#47677: [PATCH] condition-case success continuation, Richard Stallman, 2021/04/26
- bug#47677: [PATCH] condition-case success continuation, Filipp Gunbin, 2021/04/26
- bug#47677: [PATCH] condition-case success continuation, Mattias Engdegård, 2021/04/27