[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Instead of pcase
From: |
Eli Zaretskii |
Subject: |
Re: Instead of pcase |
Date: |
Fri, 01 Dec 2023 08:31:39 +0200 |
> From: João Távora <joaotavora@gmail.com>
> Date: Thu, 30 Nov 2023 20:47:22 +0000
> Cc: Lynn Winebarger <owinebar@gmail.com>, rms@gnu.org, dmitry@gutov.dev,
> philipk@posteo.net,
> emacs-devel@gnu.org
>
> On Thu, Nov 30, 2023 at 7:27 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> So I think you probably meant
>
> `(,hookfun . (,start ,end))
>
> And this is valid in both pcase and normal backquoted list
> expressions. Furthermore, here the period is _not_ redundant.
The validity is not the point I wanted to make. The point I wanted to
make is that the accepted syntax includes unusual uses of the period
and other punctuation, some of which have special meaning. And that
makes the code harder to read and understand.
Incidentally, the actual code from which this were taken is
(`(,hookfun . (,start ,end ,collection . ,plist))
Which has _two_ periods, not one, which are AFAIU redundant, as far as
the Lisp reader is concerned.
> IMO what's relatively contrived in pcase-- but very well contrived
> I should add -- is the use of the backtick and comma, whose
> usual job is output and list construction, to do the reverse,
> to express input and list destructure.
Again, the point is not that the construct cannot be explained away or
interpreted correctly given enough time and consulting the docs. The
point is the _effort_ required to understand this without being an
expert on using pcase. That is the point Richard was making, and that
is the _only_ point I wanted Lynn to understand.
- Re: Instead of pcase, (continued)
Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Michael Heerdegen, 2023/12/01
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Alan Mackenzie, 2023/12/01
- Re: Instead of pcase, Michael Heerdegen, 2023/12/02
- Re: Instead of pcase, Emanuel Berg, 2023/12/02
- Re: Instead of pcase, Richard Stallman, 2023/12/03
- Re: Instead of pcase, Richard Stallman, 2023/12/02
Re: Instead of pcase,
Eli Zaretskii <=
- Re: Instead of pcase, Yuri Khan, 2023/12/01
- Re: Instead of pcase, Eli Zaretskii, 2023/12/01
- Re: Instead of pcase, Andreas Schwab, 2023/12/01
- Re: Instead of pcase, Richard Stallman, 2023/12/03
- Re: Instead of pcase, Eli Zaretskii, 2023/12/04
- Re: Instead of pcase, Lynn Winebarger, 2023/12/04
- Re: Instead of pcase, Eli Zaretskii, 2023/12/04
- Re: Instead of pcase, Andreas Schwab, 2023/12/04
- Re: Instead of pcase, Richard Stallman, 2023/12/06
- Re: Instead of pcase, Andreas Schwab, 2023/12/07