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 03:23:47 +0000

>   (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 via email to

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