Linux Manual Pages development
 help / color / mirror / Atom feed
From: scs@eskimo.com (Steve Summit)
To: bug-gnulib@gnu.org, libc-alpha@sourceware.org, linux-man@vger.kernel.org
Subject: Re: on the irresponsibility of pursuing C language reform
Date: Sun, 02 Aug 2026 08:52:04 -0400	[thread overview]
Message-ID: <2026Aug02.0852.scs.0001@tanqueray.home> (raw)
In-Reply-To: <am5_uA4MSujYCS9X@devuan>

I'm just a lurker, but let me offer my perspective on this.

Header files in C and C++ are in large part a nuisance and a
historical relic.  If I call function x, I must include header
<y.h>.  The mapping between x and y is partly sensible, but
partly arbitrary.

Since I program in C and/or C++ every day, I can usually remember
that mapping, but when I can't, I immediately check the man page,
and I'm glad that (unlike in the old days) the Synopsis section
always reminds me which header to include.

Although I said header files are a nuisance, in one key respect
they're less of a nuisance than they used to be, because *the C
and C++ standards standardize them*.  This is a huge, huge win.
Back in the day you never knew if you could or should use
reasonable-looking headers like <memory.h> or <malloc.h>.  But
today, it's a no-brainer.  There's one right answer.  If I use
the Standard header in my code, and my code fails to compile
under some brain-dead compiler tomorrow, it's that compiler's
fault, not mine.  I don't care a bit whether the Standard's
mappings do or don't make sense; the fact that they're standard
trumps anything else.

Now, this is one man's perspective, and I concede that I'm not
an average C or C++ programmer, either.  Me, I could check the
Standard, because I have PDF copies of every version of the C
Standard right here on my laptop, but for this sort of question I
typically don't, because typing "man memset" is so much quicker.
I don't know what the average programmer does, but I would
heartily advocate for a high-quality man page to give the Right
answer, where the Right answer for standard functions is
precisely what the Standard says.

Now, there are always interesting arguments to be had about which
of the library functions still hold their weight today, which of
them might be deprecated or replaced with something newer, and
how to educate users about evolving best practices.  Certainly,
today, strncpy and strncat are the new gets.  (As it happens,
I've been spending real time just in the past few weeks coping
with the fact that not every Linux C compiler I use ships with
a glibc that supports strlcpy and strlcat.)

But with that said, the place for those "interesting arguments"
is not a man page!  Man pages are supposed to be maximally
pithy.  Just the facts, ma'am.

Finally, I really don't think that the the mapping between
function x and header <y.h>, a mapping which I characterized as
somewhat arbitrary, is something that the average programmer pays
that much attention to.  If strncpy or memset is to be found in
a header called <string.h>, that doesn't tell us that these
functions operate on strings, any more than ssprintf appearing in
<stdio.h> implies that ssprintf does I/O.  So let's put the
arguing, and the opinionating, and the educating, somewhere else,
and have the man pages document (nay, recommend) precisely the
headers that the Standard(s) say are standard.

Steve Summit

  parent reply	other threads:[~2026-08-02 12:54 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 21:18 [PATCH 0/2] alx-0097r1 - <memory.h>, the legitimate header for memcpy(3) et al Alejandro Colomar
2026-07-31 21:18 ` [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h> Alejandro Colomar
2026-07-31 21:23   ` Joseph Myers
2026-07-31 21:28     ` Alejandro Colomar
2026-07-31 21:54       ` Sam James
2026-07-31 22:18         ` Alejandro Colomar
2026-08-01  0:12           ` Alejandro Colomar
2026-08-01 14:43           ` Sam James
2026-07-31 21:51     ` on the irresponsibility of pursuing C language reform (was: [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h>) G. Branden Robinson
2026-07-31 21:59       ` on the irresponsibility of pursuing C language reform Sam James
2026-07-31 22:24         ` G. Branden Robinson
2026-07-31 23:19           ` Alejandro Colomar
2026-08-01 14:52           ` Sam James
2026-08-01 12:01         ` Alejandro Colomar
2026-08-01 12:04           ` Alejandro Colomar
2026-08-01 14:38           ` Sam James
2026-08-01 15:15             ` Alejandro Colomar
2026-08-01 16:10               ` Sam James
2026-08-01 17:09                 ` Alejandro Colomar
2026-08-01 21:34                   ` G. Branden Robinson
2026-08-01 22:22                     ` Alejandro Colomar
2026-08-01 22:26                       ` Alejandro Colomar
     [not found]                   ` <CAETFuj2OwoyK9J85r2f0RoXbHbXKA4gQJ=JZ-7=QoqGcMwk0+Q@mail.gmail.com>
2026-08-01 22:44                     ` Alejandro Colomar
2026-08-01 23:24                       ` Alejandro Colomar
2026-08-01 23:53                         ` proposed revision to memory.h(3head) (was: on the irresponsibility of pursuing C language reform) G. Branden Robinson
2026-08-02  0:27                           ` Alejandro Colomar
2026-08-02  1:03                             ` Alejandro Colomar
2026-08-02 12:52                         ` Steve Summit [this message]
2026-08-02 13:17                           ` on the irresponsibility of pursuing C language reform Alejandro Colomar
2026-08-02 13:45                             ` Steve Summit
2026-08-02 14:11                               ` Alejandro Colomar
2026-08-02 19:28                                 ` Paul Eggert
2026-08-01 20:18             ` G. Branden Robinson
2026-08-01 20:42               ` Alejandro Colomar
2026-08-01 20:45                 ` Alejandro Colomar
2026-08-01 20:52                 ` G. Branden Robinson
2026-08-01 21:12                   ` Alejandro Colomar
2026-07-31 22:10       ` on the irresponsibility of pursuing C language reform (was: [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h>) Joseph Myers
2026-07-31 22:21         ` Alejandro Colomar
2026-07-31 22:28           ` [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h> G. Branden Robinson
2026-07-31 22:42           ` on the irresponsibility of pursuing C language reform (was: [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h>) Joseph Myers
2026-07-31 22:52             ` Alejandro Colomar
2026-07-31 23:11               ` Joseph Myers
2026-07-31 23:32                 ` G. Branden Robinson
2026-08-01 12:39                   ` Alejandro Colomar
2026-08-01 14:26                   ` Christopher Bazley
2026-08-01 15:29                     ` Alejandro Colomar
2026-07-31 23:45                 ` on the irresponsibility of pursuing C language reform (was: " Alejandro Colomar
2026-08-01 12:39                   ` Douglas McIlroy
2026-08-01 19:54                     ` G. Branden Robinson
2026-08-01 20:35                       ` Alejandro Colomar
2026-07-31 23:08             ` [PATCH 1/2] man/man3/{mem,strn}*(): SYNOPSIS, STANDARDS: Document these as provided by <memory.h> G. Branden Robinson
2026-07-31 23:28               ` Joseph Myers
2026-07-31 23:57                 ` G. Branden Robinson
2026-08-01  0:06                   ` Alejandro Colomar
2026-07-31 22:05     ` Alejandro Colomar
2026-07-31 22:16       ` Joseph Myers
2026-07-31 22:33         ` Alejandro Colomar
2026-07-31 23:48     ` [PATCH 1/2] man/man3/{mem, strn}*(): " Collin Funk
2026-07-31 23:52       ` Alejandro Colomar
2026-08-01  0:01         ` Alejandro Colomar
2026-07-31 21:19 ` [PATCH 2/2] man/man*/{string.3,memory.h.3head}: Move functions to a new page memory.h(3head) Alejandro Colomar
2026-07-31 21:20 ` [PATCH 0/2] alx-0097r1 - <memory.h>, the legitimate header for memcpy(3) et al Alejandro Colomar
2026-08-01  0:25 ` [PATCH v2] man/man3/mem*(): SYNOPSIS: Document non-standard mem*() functions as provided by <memory.h> Alejandro Colomar
2026-08-01 22:22   ` Bruno Haible
2026-08-01 22:38     ` Alejandro Colomar
2026-08-01 22:55       ` Bruno Haible
2026-08-01 23:10         ` Alejandro Colomar
2026-08-01 23:26           ` Collin Funk
2026-08-01 23:34             ` Alejandro Colomar
2026-08-01 23:29           ` Paul Eggert
2026-08-01 23:36             ` Alejandro Colomar
2026-08-02  0:08               ` the Linux man-pages as an educational tool (was: [PATCH v2] man/man3/mem*(): SYNOPSIS: Document non-standard mem*() functions as provided by <memory.h>) G. Branden Robinson
2026-08-02  0:45                 ` Alejandro Colomar
2026-08-02  1:04                   ` the Linux man-pages as an educational tool Collin Funk
2026-08-02  1:15                     ` G. Branden Robinson
2026-08-02  1:15                     ` Alejandro Colomar
2026-08-02  1:49                       ` Collin Funk
2026-08-02 11:29                         ` Alejandro Colomar
2026-08-02 11:47                           ` Alejandro Colomar
2026-08-02 12:04                       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026Aug02.0852.scs.0001@tanqueray.home \
    --to=scs@eskimo.com \
    --cc=bug-gnulib@gnu.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox