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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47368: 28.0.50; map-elt returns nil without "deprecated" TESTFN


From: Basil L. Contovounesios
Subject: bug#47368: 28.0.50; map-elt returns nil without "deprecated" TESTFN
Date: Wed, 15 Sep 2021 10:26:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Michael Heerdegen [2021-09-15 02:48 +0200] wrote:

> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>> What was the conclusion?  That map-elt should use equal for alists?
>
> That was the least controversial solution discussed, at least to my
> impression.
>
> But would that include to change the default of `alist-get', too?  I
> guess these should behave consistently.

That sounds a bit too radical to me within the scope of this bug report,
and for Emacs 28.  Since alist-get has the type in its name, and allows
for a testfn argument, I personally don't see any conflict between
map-elt and alist-get having different default behaviour on alists.

> [ Personally I would still be interested in an answer to the question:
> why don't we consider to keep the TESTFN arg at least for the list map
> type case? ]

I don't feel too strongly either way, and it's not my decision, but I
guess the point is that if you already know that your map is an alist,
then you can "customise" the behaviour of map-elt by using a different
accessor function, since map.el wants to provide a type-agnostic API.

Thanks,

-- 
Basil





reply via email to

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