GNU bug report logs -
#47425
26.3; `plist-get', `plist-put' should accept a TEST function
Previous Next
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
View this message in rfc822 format
> > Plists with, e.g., string keys aren't uncommon
>
> Really? Can you give examples?
Maybe I could, but I won't try. I take it that
you don't think so. That's fine.
My expectation is that more users nowadays may
be inclined to use string keys than in the past,
because (as I said) of the influence of things
like JSON. This enhancement request is to cater
to what I expect will not be all that uncommon.
And there may be more and more use of conversion
of alists (which do often have nonsymbol keys)
to plists. For whatever reasons (good & bad).
Note too, BTW, that (not uncommon) != common.
___
CLTL2, "The Property List" says, in passing,
that `symbol-plist' keys are "typically" symbols.
It doesn't say that they _are_ symbols.
And it doesn't say anywhere that they need to
be distinguishable with just `eq'.
In any case, I'll grant you that using symbol
keys _is_ common. (The same is true of alist
keys, BTW.)
___
BTW, CLTL2 also points to this as the essential
difference between a plist and an alist:
a property list is an object with a unique
identity; the operations for adding and
removing property-list entries are destructive
operations that alter the property list rather
than making a new one. Association lists, on
the other hand, are normally augmented
non-destructively (without side effects) by
adding new entries to the front (see acons and
pairlis).
No mention of plist keys being symbols.
However, it's also true that CL defines `remprop'
as using `eq'.
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.