[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: |
Lars Ingebrigtsen |
Subject: |
bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function |
Date: |
Sun, 28 Mar 2021 21:27:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Philipp <p.stephani2@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