From: "J. Bruce Fields" <bfields@fieldses.org>
To: Michael Frank <mhf@linuxmail.org>
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: PATCH, RFC: 2.6 Documentation/Codingstyle
Date: Thu, 12 Feb 2004 20:12:13 -0500 [thread overview]
Message-ID: <20040213011213.GB25298@fieldses.org> (raw)
In-Reply-To: <200402130615.10608.mhf@linuxmail.org>
On Fri, Feb 13, 2004 at 06:15:10AM +0800, Michael Frank wrote:
> +Note that perhaps the most terrible way to write code is to put multiple
> +statements onto a single line:
If you can't manage Linus's sense of humor, go for something simple that
doesn't call attention to itself; e.g., "Don't put multiple statements
on a single line:"
> +Lagging spaces are deprecated.
Does everyone know immediately what "Lagging spaces" means? "Trailing
spaces" seem to be more common usage. "Don't leave whitespace at the
end of lines" might be clearest.
> +The limit on the length of lines is 80 columns and this is a hard limit.
> +
> +Statements longer than 80 columns will be broken into sensible chunks.
> +The beginning of a statement is the parent and further chunks are
> +descendent's. Descendent's are always shorter than the parent and
The last vowel of descendant (in the sense you're using it) is an "a",
and its plural is descendants.
Surely this section is overkill for a discussion of line lengths. The
current document has the advantage of being short.
> +Centralized exiting of functions
That, on the other hand, is something worth documenting.
> +Complex expressions are easier to understand and maintain when extra
> +parenthesis are used. Here is an extreme example
> +
> +x = (((a + (b * c)) & d) | e) // would work also without any parenthesis
Ugh. This isn't LISP here. The number of operators in C does make
keeping track of precedence tricky, but readers should be expected to
know a few things (like that * is higher precedence than +). I'd just
leave out this discussion entirely. CodingStyle is not, I think, meant
to be a complete C style guide.
> +Periods terminating kernel messages are deprecated
> +Usage of the apostrophe <'> in kernel messages is deprecated
> +Printing numbers in parenthesis ie (%d) is deprecated
I find the "X is deprecated" construction a little awkward. In any case
it's overused here.
--Bruce Fields
next prev parent reply other threads:[~2004-02-13 1:12 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-12 22:15 Michael Frank
2004-02-12 23:20 ` Tim Bird
2004-02-12 23:46 ` Måns Rullgård
2004-02-13 0:19 ` Tim Hockin
2004-02-12 23:38 ` Randy.Dunlap
2004-02-13 1:50 ` Alex Goddard
2004-02-13 1:52 ` Maciej Zenczykowski
2004-02-13 0:13 ` viro
2004-02-13 1:12 ` J. Bruce Fields [this message]
2004-02-13 8:49 ` PATCH, RFC: Version 2 of 2.6 Codingstyle Michael Frank
2004-02-13 9:44 ` Andries Brouwer
2004-02-13 11:24 ` Nikita Danilov
2004-02-16 17:56 ` Ludootje
2004-02-13 22:38 ` Randy.Dunlap
2004-02-13 8:58 ` PATCH, RFC: 2.6 Documentation/Codingstyle Giuliano Pochini
2004-02-13 9:10 ` Andrew Morton
2004-02-13 9:49 ` Michael Frank
2004-02-13 10:09 ` Nick Piggin
2004-02-13 10:50 ` Michael Frank
2004-02-18 7:39 ` Miles Bader
2004-02-13 12:44 ` viro
2004-02-13 9:19 ` David Weinehall
2004-02-13 11:42 ` Andries Brouwer
2004-02-13 12:13 ` Måns Rullgård
2004-02-13 12:42 ` Ed Tomlinson
2004-02-13 13:55 ` Giuliano Pochini
2004-02-13 14:35 ` Angelo Dell'Aera
2004-02-13 15:42 ` Giuliano Pochini
2004-02-13 15:48 ` Valdis.Kletnieks
2004-02-13 16:38 ` Angelo Dell'Aera
2004-02-13 17:03 ` Valdis.Kletnieks
2004-02-13 16:18 ` viro
2004-02-14 0:38 ` Kevin O'Connor
2004-02-14 0:56 ` Valdis.Kletnieks
2004-02-14 1:44 ` PATCH, RFC: Version 3 of 2.6 Codingstyle Michael Frank
2004-02-14 3:44 ` Dmitry Torokhov
2004-02-15 10:09 ` Jamie Lokier
2004-02-14 20:44 ` PATCH, RFC: Version 4 " Michael Frank
2004-02-14 21:27 ` viro
2004-02-16 3:47 ` PATCH, RFC: Version 5 " Michael Frank
[not found] <fa.fbh88ra.kn8094@ifi.uio.no>
2004-02-13 6:41 ` PATCH, RFC: 2.6 Documentation/Codingstyle Junio C Hamano
2004-02-13 7:18 ` vda
2004-02-13 12:37 ` Maciej Zenczykowski
2004-02-13 13:57 ` vda
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=20040213011213.GB25298@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhf@linuxmail.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
all inboxes | Powered by JetHome®