Subject: bug#17623: 24.4.50; incorrect example for `apply-partially' in (elisp) `Calling Functions'

From: Eli Zaretskii <[email-masked]>
Date: Sat, 23 Oct 2021 14:39:02 +0300

> From: Michael Heerdegen <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Sat, 23 Oct 2021 11:44:21 +0200
> 
> I disagree.  The paragraph in the manual explains what the arity of the
> function returned by `apply-partially' would be.
> 
> Directly following is an example suggesting that (apply-partially '+ 1)
> is equivalent to #'1+ - which obviously contradicts that preceding
> paragraph.

In what sense is that a contradiction?  (+ 1 10) is equivalent to (1+ 10),
so we have N = 2 arguments in the original function and M = 1 = N - 1 in
the new one.

> I'm a bit confused that you don't consider this a problem, and also that
> you said there were no concrete suggestions.

That suggestion doesn't make the documentation more clear, IMNSHO,
unless the reader already knows about apply-partially and generally
has a lot of background knowledge about Lisp and Emacs Lisp.  Why are
you saying the suggestion is not being considered, whereas in reality
it was considered (and rejected)?

> There were concrete suggestions for improvements.  One was to simply
> spell out the function that is constructed.  It is only one line, and
> would make the semantics clear.

I cannot disagree more.  That one line doesn't make anything clear, it
just shows the implementation.

> BTW, whenever I posted an example using `apply-partially', Stefan told
> me that it would be more efficient to write out the lambda.  That aspect
> could also be covered: when is worth using?

Concrete proposals for expanding the documentation of apply-partially
(read: patches) will be most welcome, of course.

> Or delete that paragraph, better to say nothing than to confuse readers.

I object to deleting that.  That text certainly helps me, so it cannot
be useless, let alone harmful.