SQLite Forum

Mention if printf() should have been called sprintf()
Login

Mention if printf() should have been called sprintf()

(1) By Dan Jacobson 積丹尼 (jidanni) on 2021-07-30 20:15:37 [link] [source]

On https://www.sqlite.org/printf.html :

Mention somewhere on this page if printf() should have been called sprintf(), as it returns a string that can be used further, instead of printing directly to the terminal.

Also "the reason is ... because" is supposed to be bad grammar.

(2) By Warren Young (wyoung) on 2021-07-30 21:02:38 in reply to 1 [source]

printf() should have been called sprintf()

What end would this public self-flagellation serve?

You’re welcome to your opinion. I just don’t see what benefit the SQLite project gets from publishing it as part of the official docs.

If SQLite were the sort of project where APIs could be renamed, we’d have a point of discussion, but it isn’t, so we don’t.

bad grammar

Do you have a suggested replacement? Perhaps “…the reason is…that…”?

Found a typo, by the way: “student a Duke”

(3) By Larry Brasfield (larrybr) on 2021-07-30 23:20:05 in reply to 1 [link] [source]

Mention somewhere on this page if printf() should have been called sprintf(), ...

As Warren intimates, such a change would need to serve the purposes for which the documentation was created and evolved to be worthy of inclusion. A foray into the could've/should've realm would be contrary to those purposes as it would help nobody to use the SQLite library or understand its history while tending to dilute the text.

Also "the reason is ... because" is supposed to be bad grammar.

I'm not so sure that it is bad grammar so much as inconsistent with common usage once parsed. Because that has some small potential for momentary reader miscomprehension1, it has been fixed in the docs repo, to reach the website when more momentous improvements warrant that push.


  1. Few SQLite users would fail to understand what was meant, but we like to avoid the occasional reread that unusual sentence construction might induce.