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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philipp <p.stephani2 <at> gmail.com>
Cc: Nicolas Petton <nicolas <at> petton.fr>, 47425 <at> debbugs.gnu.org,
 Drew Adams <drew.adams <at> oracle.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST
 function
Date: Sun, 28 Mar 2021 21:27:09 +0200
Philipp <p.stephani2 <at> gmail.com> writes:

> I'm not a fan of this since it would mean that these functions will no
> longer be side-effect-free.  Adding a function argument to a function
> means that the function can no longer really promise anything, so it
> leads to code that's harder to reason about.

`plist-put' already mutates state (of the plist), so it's not
side-effect-free...

The other ones are, though.  But...  I'm not sure that's really much of
a concern in practice.  (And Emacs should be able to reason about the
function, still, if the predicate passed in is side effect free, but I
guess we don't have the machinery for that in place?)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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.