all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Emanuel Berg <incal@dataswamp.org>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Wed, 28 Dec 2022 03:23:47 +0000	[thread overview]
Message-ID: <SJ0PR10MB548823A932D1E64545663CB9F3F29@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87zgb913fg.fsf@dataswamp.org>

>   (cl-pushnew "/usr/share/emacs/site-lisp/elpa-src/slime-2.26.1"
>               load-path
>               :test #'string=)
> 
> but this is not a model I can endorse, this is why you have that
> level of abstraction to begin with, i.e., not to be bothered all the
> time with implementation details.
> 
> Might as well to provide :loop #'cl-dolist how to iterate the
> list as well ...
> 
> And after that ... is there anything else to specify before we can
> get rid of `cl-pushnew' altogether since it amounts to doing
> everything manually anyway?

`cl-pushnew' should be an emulation of Common Lisp
`pushnew' - neither more nor less.

I'm not sure what your point is, but `pushnew'
defaults to using `eql', not `equal' (or
`string=').  So if you want `pushnew' to compare
strings then yes, you should pass a predicate
such as `string=' (or `equal').

https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node149.html
___

IMHO, it should be the case for _all_ things that
`cl-lib' tries to support.  We shouldn't (IMO) be
in the business of adding stuff to `cl-lib' that
has nothing to do with CL.  But that's happened.

On the other hand, there's no reason (IMO) that
Elisp can't have its own functions that have the
same name as CL functions (sans `cl-').  In that
case the Elisp functions need not behave the same
as the CL ones.  IOW, `cl-lib', and the `cl-'
prefix, should be reserved for CL emulation.

Elisp has `push', for example.  It need not be
the same as CL `push' (but I believe it pretty
much is).  Emacs could just as well have a `case'
macro, and not require you to load `cl-lib'.
Similarly for other commonly useful macros.  Why
does Elisp have one CL thing (without `cl-') and
not another?  You might well ask.



  reply	other threads:[~2022-12-28  3:23 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     ` Drew Adams [this message]
2022-12-28  4:23       ` [External] : " 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
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=SJ0PR10MB548823A932D1E64545663CB9F3F29@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=incal@dataswamp.org \
    /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.