[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Instead of pcase
From: |
Stefan Monnier |
Subject: |
Re: Instead of pcase |
Date: |
Fri, 24 Nov 2023 23:15:14 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> > To interpret those backquotes and commas, one can imagine that the they
> > do the inverse of the usual.
> I uderstand that when you say it, but when I saw the line
>
> (`(,hookfun . (,start ,end ,collection . ,plist))
>
> I was not sure which part of the line that rule applies to.
Interesting. I find this one to be very straightforward.
The previous line with the `and` and the `pred` is the more problematic one.
> In particular, what is the reason for the period and inner
> parenthsses?
Because (HOOKFUN . VALUE) is what is returned by the `run-hook-wrapped`
function and (,START ,END ,COLLECTION . ,PLIST) is the format of the
value returned by the hook's functions.
IOW, a merely stylistic choice.
> Why doesn't the code say this?
>
> (`(,hookfun ,start ,end ,collection . ,plist)
>
> Would that be equiva;ent?
Interesting. `pcase` is a macro, so it does not see the above
characters, it only sees the resulting Sexp returned by the Lisp reader,
and as you may remember, the reader returns *exactly* the same Sexp
for the above two lines of text.
So `pcase` would be hard pressed to make those two *not* equivalent :-)
Stefan
- 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, 2023/11/30
- Re: Instead of pcase,
Stefan Monnier <=
- 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