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

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 26 Mar 2021 22:14:01 UTC

Severity: wishlist

Found in version 26.3

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #85 received at 47425 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Mattias EngdegÄrd <mattiase <at> acm.org>
Cc: Philipp Stephani <p.stephani2 <at> gmail.com>,
 Lars Ingebrigtsen <larsi <at> gnus.org>, Nicolas Petton <nicolas <at> petton.fr>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>,
 "47425 <at> debbugs.gnu.org" <47425 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: 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.




This bug report was last modified 3 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.