bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Stefan Monnier
Subject: bug#47425: 26.3; `plist-get', `plist-put' should accept a TEST function
Date: Mon, 27 Jun 2022 08:18:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen [2022-06-27 13:43:23] wrote:
> Mattias Engdegård <mattiase@acm.org> writes:
>> The cost of adding an equality predicate is not huge but also not
>> really motivated.
> The motivation is greater symmetry with assoc and friends.  That is,
> people have been forced to use alists where they'd more naturally prefer
> to use plists because of the eq restriction.

Then again, plists should never have existed, in my book.
They're just strictly worse than alists as datastructures.
Their only advantage is that sometimes when you write them by hand it
they're somewhat more compact (fewer dots and parentheses) but for those
cases `eq` is always good enough in my experience.

I'd be curious to hear of a use case where plists are better than alists
while at the same time requiring a non-eq comparison.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]