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 #94 received at 47425 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 47425 <at> debbugs.gnu.org, mattiase <at> acm.org, nicolas <at> petton.fr,
 p.stephani2 <at> gmail.com, monnier <at> iro.umontreal.ca, drew.adams <at> oracle.com
Subject: Re: bug#47425: 26.3;
 `plist-get', `plist-put' and proposed TEST function
Date: Tue, 28 Jun 2022 23:33:40 -0400
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

CL-style keyword arguments to modify list operations are clunky.
Unless we implement them in an extra-complicated way, they will slow
down the usual case, too.  I understand the motivation for proposing
this change, but let's solve it in a cleaner way that doesn't invite
copying the bad designs of CL.

Here are two ways that occur to me.

* The applications that want to compare property names with `equal'
could canonicalize those names.  For instance, intern the strings
you want to use as property names, perhaps in a special obarray.
Then you can use `plist-get' and `plist-put' on them and get the
results you want.

* Define functions `plist-get-equal' and `plist-put-equal'.
Instead of complicating the definitions of widely used functions `plist-get'
and `plist-put', it will define two new functions that most users won't
need to pay attention to.


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






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.