Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: uweigand@de.ibm.com, gdb-patches@sourceware.org
Subject: Re: [RFC/RFA] Introduce new struct parse_context
Date: Fri, 21 Dec 2007 16:34:00 -0000	[thread overview]
Message-ID: <uve6shux5.fsf@gnu.org> (raw)
In-Reply-To: <20071221043608.GJ6154@adacore.com> (message from Joel Brobecker 	on Fri, 21 Dec 2007 08:36:08 +0400)

> Date: Fri, 21 Dec 2007 08:36:08 +0400
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: uweigand@de.ibm.com, gdb-patches@sourceware.org
> 
> I would tend to say that your suggestion is a good one, and we should
> request documentation when necessary. But I think that this should
> be evaluated on a case-by-case basis, because there are some times
> when external documents such as gdbint will be more useful, and other
> times when it will be more appropriate to leave the documentation
> as a comment embedded in the code.
> 
> Let's take the two patches of this thread as an example. Would you
> suggest to move the documentation to gdbint, or leave it in the
> code?  To me, it seems better to put keep the documentation with
> the code.

We had this discussion in the past, and I'm well aware that some of
the maintainers think that code comments are better than a manual that
documents the internals.  I can only reiterate what I wrote back then:
I think code comments are not a replacement for a good internals
manual.  Comments don't have a structure.  They lack good
cross-referencing facilities.  They don't have any efficient ways of
searching for text by a word or phrase that describes the topic or
subject we are looking for (something like index search in Info).

Comments also tend to describe details, but not the overall picture.

In sum, I think comments are not appropriate for someone who wants to
learn about a subject she knows next to nothing about.

> If we were to put some documentation in gdbint for this patch,
> what would you put?

Both.  This is a significant new feature, and at least its main
principles should be described in gdbint, enough to get the reader off
the ground with the knowledge she could use to find the parts of code
which implement this feature (and read the comments there ;-).


  reply	other threads:[~2007-12-21 16:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17  7:03 Joel Brobecker
2007-12-17 13:34 ` Daniel Jacobowitz
2007-12-17 20:35 ` Eli Zaretskii
2007-12-21  5:02   ` Joel Brobecker
2007-12-21 16:34     ` Eli Zaretskii [this message]
2007-12-22  6:27       ` Joel Brobecker
2007-12-22 17:39         ` Eli Zaretskii
2007-12-26 11:04           ` Joel Brobecker
2007-12-29 22:44             ` Eli Zaretskii

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=uve6shux5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /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