On 16/12/2025 00:06, Christian Moe wrote:
Then the English word
"format" might make more sense than the nonsense string "printf," even
if they don't know that format is the name of an elisp function.

The word "format" is too generic while "printf" is quite precise for those who are familiar with this kind of mini-language.

Or they
might be more familiar with Java than with C and friends, in which case
"format" would recall String.format()

I was not aware what name is used for the method in Java and I admit that more than a half of introductory articles from top search results do not mention "printf". On the other hand first phrase in the reference

<https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/util/Formatter.html>
"Class Formatter... An interpreter for printf-style format strings."

Besides it, I have noticed System.out.printf.

More examples:
- In POSIX shell printf is more portable than echo and allows to avoid some pitfalls.
- <https://pkg.go.dev/fmt>
"Package fmt implements formatted I/O with functions analogous to C's printf and scanf."
Of course, every implementation has its own specifics.

But
perhaps it would be helpful if the manual also referred to the docstring
of format or to [[info:elisp#Formatting Strings][elisp#Formatting
Strings]] for details on how to construct format specifications.

I am not against this link, it will be helpful. I am surprised that associative references to printf (as the name of formatting DSL) was completely broken. I would not complain if elisp `format' were used *in addition to* "printf", not *instead of it*.

Reply via email to