help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'


From: Stefan Monnier
Subject: Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Thu, 29 Dec 2022 14:45:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> Oh, you meant that the simpler `case' syntax might
> be harder for some of the people who are used to
> the more complex syntax of `pcase', where you need
> to quote symbols as values to be compared.

No, I mean that even for some people unfamiliar with `pcase` syntax, the
`pcase` syntax is simpler (more natural?) than the cl-`case` syntax: the
incorrect use of `quote` in `cl-case` predates the invention of `pcase` :-)

>> > IOW, I don't argue that we shouldn't have `pcase'.
>> > I don't see why we shouldn't also have `case'
>> > (sans `cl-'), that's all.
>> What's the benefit (other than having to learn 2
>> subtly different things instead of just one)?
> Simpler, for simple cases.

I don't think `case` is objectively simpler.

More specifically, I believe that if you're familiar with neither `cl-case`
nor `pcase` syntax, it's not easier to learn the `case` syntax than the
subset of `pcase` syntax which covers the functionality of `cl-case`.

It may even be objectively easier to learn the `pcase` syntax since it
doesn't suffer from special cases like when you want to distinguish one of
the `nil`, `t`, or `otherwise` values.


        Stefan




reply via email to

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