[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: |
Thu, 29 Dec 2022 19:06:28 +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, I did mean exactly what I wrote.
> > No need to quote.
> I know. But lots of users don't and they so quote,
> hence using the syntax that would be correct with
> `pcase` but that has a "subtly" different meaning
> for `cl-case`. That's what I meant by "even easier
> for some people".
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.
Sure, maybe so. That goes without saying.
Simple can surprise if you're expecting difficult.
`pcase' has to have complicated syntax because it's,
well, complicated - it does much more than simply
test a symbol's value with `eql'.
Likewise, `cond' needs more complex syntax. That's
why Lisp has `if' AND `case' AND `when' AND `or'...
Shades of cl-loop-is-all-you-need-so-use-only-loop
discussion.
> > 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.
What's the benefit of having both `if' and `cond'
in the language? Or both `pcase' and `cond'?
Or...? Why not just learn one, and not bother
with the others? **`pcase' Cider-House rules!**
I can hardly believe you're asking this. `pcase'
is a useful multi-tool. But sometimes you just
need a tiny pen knife. You can do everything
with just `if', or just `cond', or just...
But why have to?
No one's _obliged_ to learn `case' in addition to
`pcase' (or `cond' or...). Anyone can stick with
just `pcase' (or...).
That you might need to learn the syntax of some
language construct _IF_ you want to use it, seems
obvious. And how hard is it to learn the syntax
of `case' (or even of `cond') compared to that of
`pcase'? Mole hill / mountain.
<<attachment: winmail.dat>>
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', (continued)
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Emanuel Berg, 2022/12/29
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Emanuel Berg, 2022/12/29
- Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Emanuel Berg, 2022/12/29
- Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Emanuel Berg, 2022/12/29
- Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Emanuel Berg, 2022/12/29
- Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/29
- RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Drew Adams, 2022/12/28
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/28
- RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Drew Adams, 2022/12/28
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/28
- RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql',
Drew Adams <=
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/29
- RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Drew Adams, 2022/12/29
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/29
- RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Drew Adams, 2022/12/30
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/30
- RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Drew Adams, 2022/12/30
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/30
- RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Drew Adams, 2022/12/30
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Stefan Monnier, 2022/12/30
- Re: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql', Emanuel Berg, 2022/12/29