Subject: Re: bug#76413: [PATCH] New macro 'compf' for composing functions

From: Rudolf Schlatte <[email-masked]>
Date: Mon, 24 Feb 2025 09:57:01 +0100

Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <[email-masked]> writes:

> Hi,
>
> Stefan Kangas <[email-masked]> writes:
>
>> Eshel Yaron <[email-masked]> writes:
>>
>>>> Why not name it `compose` as in CL and ELisp?
>>>
>>> It's a slightly different construct then Common Lisp's compose, so I
>>> feel like calling it by that name could lead to wrong expectations.
>>> Another option is fcomp instead of compf, BTW, if that seems better.

FWIW, compose is not in the CL standard, but is contained in the
alexandria library which supplies things that "should be" in CL.  Guile
Scheme does seem to name the function compose:
https://www.gnu.org/software/guile/manual/html_node/Higher_002dOrder-Functions.html

>>
>> It's slightly less typing, but also risks being more unclear, as it has
>> different evaluation rules.  The name `compf` is similarly fine, but to
>> me comes off as a little bit cryptic.
>
> I think it strikes a good balance between being concise and being
> cryptic, like "incf" does.  But naming things is hard...

In CL, the "f" suffix is usually used for macros that modify a place: incf,
rotatef, setf, ... so compf doesn't really fit that scheme.