help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 30.0 warning from `cl-pushnew' and `memql'


From: Emanuel Berg
Subject: Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Wed, 28 Dec 2022 15:54:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

tomas wrote:

>> I think the interpretation of the question "Could there be
>> a better default comparison function?", in the sense that
>> `eql' is a bit nicer than `eq' for specific value types, is
>> valid, especially when considering that `cl-pushnew' is
>> often used for configuration stuff or other purposes where
>> speed is not crucial.
>
> I see. Well, that train has sailed (or something).
> Backward compat (especially with user's brains) and things.

But in a way it makes sense since if you write the code the
right way for the same data, it works ...

(require 'cl-lib)

(let ((lst '())
      (str "a") )
  (cl-pushnew str lst)
  (cl-pushnew str lst)
  lst) ; ("a")

(let ((lst '()))
  (cl-pushnew "a" lst)
  (cl-pushnew "a" lst)
  lst) ; ("a" "a")

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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