From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>,
"'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'"
<help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Thu, 29 Dec 2022 19:06:28 +0000 [thread overview]
Message-ID: <SJ0PR10MB54884D47DE0371B1FFE9722CF3F39@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <jwva636zy09.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2459 bytes --]
> >> > 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 #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 15222 bytes --]
next prev parent reply other threads:[~2022-12-29 19:06 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 20:38 Emacs 30.0 warning from `cl-pushnew' and `memql' Emanuel Berg
2022-12-27 6:56 ` Jean Louis
2022-12-27 10:28 ` Michael Heerdegen
2022-12-27 11:33 ` Emanuel Berg
2022-12-27 11:39 ` Emanuel Berg
2022-12-28 3:23 ` [External] : " Drew Adams
2022-12-28 4:23 ` Emanuel Berg
2022-12-29 22:27 ` Drew Adams
2022-12-30 22:27 ` Emanuel Berg
2022-12-30 6:30 ` tomas
2022-12-28 6:25 ` tomas
2022-12-28 11:59 ` Michael Heerdegen
2022-12-28 12:41 ` tomas
2022-12-28 12:45 ` Emanuel Berg
2022-12-28 13:19 ` Emanuel Berg
2022-12-28 14:54 ` Emanuel Berg
2022-12-29 22:31 ` Stefan Monnier via Users list for the GNU Emacs text editor
2023-01-08 4:18 ` Emanuel Berg
2023-01-08 18:54 ` Andreas Eder
2022-12-28 17:57 ` [External] : " Drew Adams
2022-12-28 18:10 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-28 19:29 ` Emanuel Berg
2022-12-28 19:35 ` Drew Adams
2022-12-28 19:36 ` tomas
2022-12-28 19:24 ` Emanuel Berg
2022-12-28 17:54 ` Drew Adams
2022-12-28 18:05 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-28 19:35 ` Drew Adams
2022-12-29 3:34 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-29 19:06 ` Drew Adams [this message]
2022-12-29 19:45 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-29 22:00 ` Drew Adams
2022-12-29 22:25 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-30 7:29 ` Drew Adams
2022-12-30 18:55 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-30 22:55 ` Drew Adams
2022-12-31 0:08 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-31 2:45 ` Drew Adams
2022-12-31 4:53 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-28 19:21 ` Emanuel Berg
2022-12-28 20:24 ` Jean Louis
2022-12-28 20:56 ` Emanuel Berg
2022-12-28 21:24 ` [External] : " Drew Adams
2022-12-28 22:47 ` Jean Louis
2022-12-28 23:48 ` Emanuel Berg
2022-12-29 6:03 ` tomas
2022-12-29 6:59 ` Emanuel Berg
2022-12-29 7:08 ` Emanuel Berg
2022-12-29 7:19 ` Emanuel Berg
2022-12-29 22:41 ` Drew Adams
2022-12-30 23:03 ` Emanuel Berg
2022-12-30 6:35 ` tomas
2022-12-29 9:18 ` Jean Louis
2022-12-29 10:04 ` Emanuel Berg
2022-12-29 10:12 ` tomas
2022-12-29 10:20 ` Emanuel Berg
2022-12-29 10:26 ` Emanuel Berg
2022-12-29 10:36 ` Michael Heerdegen
2022-12-29 14:47 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-12-29 10:39 ` Michael Heerdegen
2022-12-28 12:44 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR10MB54884D47DE0371B1FFE9722CF3F39@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.