[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: |
Mon, 27 Jun 2022 12:22:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> 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?)
We don't.
Anyway, that was the only objection here, so I went ahead and made this
change in Emacs 29.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function,
Lars Ingebrigtsen <=
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Mattias Engdegård, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Lars Ingebrigtsen, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Stefan Monnier, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Mattias Engdegård, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Lars Ingebrigtsen, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Mattias Engdegård, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Lars Ingebrigtsen, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Stefan Monnier, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Lars Ingebrigtsen, 2022/06/27
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Drew Adams, 2022/06/27