[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: combining cond and let, to replace pcase.
From: |
Eli Zaretskii |
Subject: |
Re: combining cond and let, to replace pcase. |
Date: |
Sun, 19 Nov 2023 16:49:28 +0200 |
> Date: Sun, 19 Nov 2023 15:59:46 +0200
> Cc: emacs-devel@gnu.org
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> On 19/11/2023 15:08, Eli Zaretskii wrote:
> >> Actually both and none, this is exactly the point I raised in my other
> >> reply - both have exactly the same complexity, and it is totally
> >> subjective and only habit which one you prefer.
> > It isn't only that. It is also that the obscure and subtle nature of
> > regexp strings makes it easy to make mistakes. Just look at the sheer
> > number of regexp mistakes uncovered in our code base by Mattias
> > Engdegård during the last year. It isn't an accident.
>
> pcase is much better guarded against programmer mistakes because in a
> lot of cases typos or misunderstandings will be highlighted by the
> byte-compiler (potentially, with flymake directly in the buffer, which I
> also recommend everyone to enable).
When we review patches, we don't normally byte-compile the changes,
nor need to run flymake on it. Usually, it's enough to read the code.
Having to use non-trivial tools (which means apply the changes, which
means use some scratch branch or something similar) is extra hurdle.
It also means patches cannot be easily reviewed if all you have is a
MUA, without a full-blown Emacs development environment.
IOW, it means extra requirements and restrictions, so it's a
disadvantage. It raises the bar.
- Re: combining cond and let, to replace pcase., (continued)
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/19
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/20
- Re: combining cond and let, to replace pcase., Eli Zaretskii, 2023/11/20
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/21
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/21
- Re: combining cond and let, to replace pcase., Dmitry Gutov, 2023/11/19
- Re: combining cond and let, to replace pcase.,
Eli Zaretskii <=
- Re: combining cond and let, to replace pcase., Dmitry Gutov, 2023/11/19
- Re: combining cond and let, to replace pcase., Gerd Möllmann, 2023/11/19
- Re: combining cond and let, to replace pcase., Tomas Hlavaty, 2023/11/19
- Re: combining cond and let, to replace pcase., Stefan Monnier, 2023/11/24
- Re: combining cond and let, to replace pcase., João Távora, 2023/11/28
- Re: combining cond and let, to replace pcase., Stefan Monnier, 2023/11/28
- Re: combining cond and let, to replace pcase., Alan Mackenzie, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/21
- Re: combining cond and let, to replace pcase., Axel Forsman, 2023/11/19
- Re: combining cond and let, to replace pcase., Michael Heerdegen, 2023/11/21