[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Instead of pcase
|
From: |
João Távora |
|
Subject: |
Re: Instead of pcase |
|
Date: |
Thu, 30 Nov 2023 20:47:22 +0000 |
On Thu, Nov 30, 2023 at 7:27 PM Eli Zaretskii <eliz@gnu.org> wrote:
> I think you are missing the point. The point is that pcase has so
> many semi-magical syntax features that use punctuation characters in
> creative ways that every extra punctuation character presents a
> puzzle. Faced with
>
> (`(,hookfun . ,start ,end))
>
> one immediately asks himself why the period,
> where in "normal" Lisp expressions it would be completely
> redundant?
FWIW the period is pretty self-evident to me that it separates
a car from a cdr in given cell of a cons chain.
However, in your example this is an error, just as it is in
this "normal" expression if what you wanted was to construct
a list.
`(,hookfun . ,start ,end)
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.
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.
João
- Re: Instead of pcase, (continued)
- Re: Instead of pcase, Dmitry Gutov, 2023/11/24
- Re: Instead of pcase, Lynn Winebarger, 2023/11/24
- Re: Instead of pcase, Richard Stallman, 2023/11/27
- Re: Instead of pcase, Lynn Winebarger, 2023/11/30
- Re: Instead of pcase, Eli Zaretskii, 2023/11/30
- Re: Instead of pcase, Michael Heerdegen, 2023/11/30
- Re: Instead of pcase,
João Távora <=
- Re: Instead of pcase, Stefan Monnier, 2023/11/24
- Re: Instead of pcase, Richard Stallman, 2023/11/26
- Re: Instead of pcase, Michael Heerdegen, 2023/11/30
- Re: Instead of pcase, Dmitry Gutov, 2023/11/16
- Re: Instead of pcase, Emanuel Berg, 2023/11/17
- Re: Instead of pcase, Eli Zaretskii, 2023/11/17
Re: Instead of pcase, Richard Stallman, 2023/11/25
Re: Instead of pcase, Michael Heerdegen, 2023/11/16