emacs-devel
[Top][All Lists]
Advanced

[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: Fri, 1 Dec 2023 10:13:44 +0000

On Fri, Dec 1, 2023 at 8:10 AM Eli Zaretskii <eliz@gnu.org> wrote:

> Exactly my point: these periods and other special characters are
> "magic" in pcase, but not elsewhere in Lisp.  Sometimes they are just
> for better readability, sometimes they are significant in other ways.

What you're saying isn't correct, Eli.  That period you are pointing to
has _exactly_ the same magic "elsewhere in Lisp" as it does in "pcase".

Forget pcase for a minute.  "Elsewhere in Lisp", if all those 5 symbols
are bound, then your example (now corrected):

  `(,hookfun . (,start ,end ,collection . ,plist))

produces a list made up with four cons cells.

If you take out the periods:

  `(,hookfun (,start ,end ,collection ,plist))

This still produces a list, but now it's made up of six cons cells!
That's a world of difference.

In a different email, I've explained how, both in 'pcase' and "elsewhere
in Lisp", your example can be rewritten with one less period to still use
four cons cells exactly.

João



reply via email to

[Prev in Thread] Current Thread [Next in Thread]