From: DJ Delorie <dj@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFC] Stop putting function comments in foo.h
Date: Mon, 17 Mar 2014 17:15:00 -0000 [thread overview]
Message-ID: <xn8us8ags2.fsf@greed.delorie.com> (raw)
In-Reply-To: <53271DC0.3050405@redhat.com> (Pedro Alves's message of "Mon, 17 Mar 2014 16:07:28 +0000")
Pedro Alves <palves@redhat.com> writes:
> Whenever I look at a header file that doesn't document its
> functions' interfaces (and often doesn't even list the
> parameter names), I get depressed and disappointed. I'm
> wondering if it's just me. :-)
Speaking from the "someone who uses the API but doesn't understand the
source tree" point of view, it's usually a lot easier to discover an API
through the header files, and that's where I expect to find some
documentation about the API.
The only time that documentation-in-source works is when there's a
strict one-to-one mapping of headers to sources, else finding the
documentation becomes yet another task to hurdle.
Also, I've yet to find a doxygen doc set that adds any value over just
commenting the headers.
Also, IMHO there should be *two* sets of in-source docs: the headers
should have comments suitable for users of each API, and the source
should have comments relevent to those editing the implementation.
next prev parent reply other threads:[~2014-03-17 17:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-15 19:45 Doug Evans
2014-03-16 9:51 ` Gerhard Gappmeier
2014-03-17 0:38 ` Yao Qi
2014-03-17 13:44 ` Joel Brobecker
2014-03-17 14:23 ` Sergio Durigan Junior
2014-03-17 16:09 ` Pedro Alves
2014-03-17 17:15 ` DJ Delorie [this message]
2014-03-17 21:59 ` Stan Shebs
2014-03-18 7:47 ` Ricard Wanderlof
2014-03-18 15:59 ` Doug Evans
2014-03-26 16:45 ` Doug Evans
2014-03-26 19:05 ` Doug Evans
2014-03-26 20:43 ` Pedro Alves
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=xn8us8ags2.fsf@greed.delorie.com \
--to=dj@redhat.com \
--cc=gdb-patches@sourceware.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