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

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

bug#27584: 26.0.50; alist-get: Add optional arg TESTFN


From: Tino Calancha
Subject: bug#27584: 26.0.50; alist-get: Add optional arg TESTFN
Date: Fri, 07 Jul 2017 15:39:18 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Nicolas Petton <nicolas@petton.fr> writes:

> Tino Calancha <tino.calancha@gmail.com> writes:
>
>
>> 1. In my patch `assoc-predicate' is a defsubst.
>>    Should does exit at all?
>
> I would inline its call and use `assoc-default' directly, but I guess
> it's a matter of taste.
Following Stefan suggestion, we can optimize using a compiler macro.
Then, `assoc-default' is just the default case.
>
> But wouldn't it be better if `assoc' took an optional testfn?  I'm not
> sure I like the `full' parameter in `assoc-default', and I think the
> inconsistency of the return values between `assoc' and `assoc-default'
> is already confusing.
In fact, that would kill 2 birds in a shot.





reply via email to

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