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

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

bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function


From: Drew Adams
Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function
Date: Mon, 27 Jun 2022 17:41:44 +0000

> > And it doesn't say anywhere that they need to
> > be distinguishable with just `eq'.
> 
> Operations on property lists in Common Lisp use `eq`.
> There is no option to use another equality predicate.

Yes, I mentioned that fact.

CL was of course defined 40 years ago.  And
its users, especially back then, didn't come
from backgrounds that commonly included using
key-value with string keys (such as JSON).

And CL didn't change pre-existing functions
(such as `remprop'), to give them :test args,
as much as it added such args to new functions.
CL sequence functions have :test, for example.
(And a plist is a sequence.).

Also, unlike Elisp, CL doesn't document any
use of plists other than `symbol-plist' - it
specifically didn't adopt the use of
"disembodied" plists, for example.
___

I don't think that providing a TEST arg will
needlessly encourage the use of non-symbol
keys.  I don't see how it will hurt, at all.

But if someone thinks it's very important to
discourage the use of non-symbol keys, then
that can be added to the doc string.  That's
not equivalent to not allowing a TEST arg.





reply via email to

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