From: Matthew Wilcox <willy@debian.org>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: Valdis.Kletnieks@vt.edu, Dave Jones <davej@redhat.com>,
Matthew Wilcox <willy@debian.org>,
Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CONFIG_* In Comments Considered Harmful
Date: Wed, 1 Oct 2003 15:49:29 +0100 [thread overview]
Message-ID: <20031001144929.GP24824@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20031001144223.GJ31698@wohnheim.fh-wedel.de>
On Wed, Oct 01, 2003 at 04:42:23PM +0200, Jörn Engel wrote:
> On Wed, 1 October 2003 10:29:55 -0400, Valdis.Kletnieks@vt.edu wrote:
> > On Wed, 01 Oct 2003 15:19:52 BST, Dave Jones said:
> >
> > > Maybe it should be taught to parse comments? There are zillions of
> > > #endif /* CONFIG_FOO */
> > > braces in the tree. Why is this one special ?
> >
> > I think it's because it looked like:
> >
> > #ifdef CONFIG_FOO
> > ....
> > #endif /* CONFIG_FOO or CONFIG_BAR */
> >
> > and it concluded there was a dependency on BAR.
>
> Or rather like this:
>
> #ifdef CONFIG_FOO
> ...
> #endif /* CONFIG_FO */
>
> Problem is that we humans correct the type before it even reaches our
> conciousness. Machines don't do that yet.
But it used to look like
#ifdef BAR || BAZ
...
#endif /* BAR || BAZ */
now it looks like
#ifdef BAZ
...
#endif /* BAR || BAZ */
if you can't trust people to keep comments up to date, delete the comments.
No comments are better than wrong comments.
Remember the classic?
/* Keep these two variables together */
int bar;
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next prev parent reply other threads:[~2003-10-01 14:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-01 13:26 [PATCH] CONFIG_* In Comments Considered Harmful Matthew Wilcox
2003-10-01 14:19 ` Dave Jones
2003-10-01 14:29 ` Valdis.Kletnieks
2003-10-01 14:42 ` Jörn Engel
2003-10-01 14:49 ` Matthew Wilcox [this message]
2003-10-01 14:41 ` Muli Ben-Yehuda
2003-10-01 14:39 ` Jörn Engel
[not found] ` <20031001145206.GH29313@actcom.co.il>
2003-10-01 15:10 ` Jörn Engel
2003-10-01 20:15 ` Muli Ben-Yehuda
2003-10-01 20:27 ` Linus Torvalds
2003-10-01 14:58 ` Sam Ravnborg
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=20031001144929.GP24824@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=Valdis.Kletnieks@vt.edu \
--cc=davej@redhat.com \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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