[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: |
Drew Adams |
Subject: |
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.
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, (continued)
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Drew Adams, 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, Drew Adams, 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, Basil L. Contovounesios, 2022/06/28
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function, Lars Ingebrigtsen, 2022/06/28
- bug#47425: 26.3; `plist-get', `plist-put' and proposed TEST function, Richard Stallman, 2022/06/28
- bug#47425: 26.3; `plist-get', `plist-put' and proposed TEST function, Drew Adams, 2022/06/29
- bug#47425: 26.3; `plist-get', `plist-put' and proposed TEST function, Richard Stallman, 2022/06/29
- bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function,
Drew Adams <=