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: Drew Adams
Subject: RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Wed, 28 Dec 2022 19:35:54 +0000

> > And it applies to `case', IMHO.  Encouraging or
> > coercing folks to use `pcase' or `cond' just to
> > handle the simple and common case of `case' is
> > overkill.
> 
> For those cases handled by `(cl-)case`, `pcase` is just as easy to use
> [ apparently even easier for some people who otherwise write (case FOO
> ('a (do-a)) ('b (do-b) ...)) ], so I don't see what's overkill about it.

Did you mean (case FOO (a (do-a)) (b (do-b) ...))?
                        ^          ^
No need to quote.

And no need to use `or' to match a set of values:
(case FOO ((a b) (do ab)) ((c d e) (do-cde))...)

And no need to fathom all the rest of pcase's
complicated syntax.  Complicated syntax is good
when you need to do something complex.

And yes, it's good to have something that handles
lots of cases, even if that makes understanding
the syntax complicated.  But that's not a reason
not to _also_ have a simple syntax for a common,
simple use case.  `pcase' provides the former;
`case' provides the latter.

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.

<<attachment: winmail.dat>>


reply via email to

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