Re: Coding standards. (Was: Re: [PATCH] [2.5] Non-blocking write can block)

From: Timothy Miller (
Date: Mon Jun 09 2003 - 13:44:53 EST

Jörn Engel wrote:
> On Mon, 9 June 2003 12:24:35 -0400, Timothy Miller wrote:
>>One thing I wanted to mention, however, is that your tongue-in-cheek
>>style doesn't help you. Coding style is something that needs to be
>>taken seriously when you're setting standards.
> Coding style is secondary. It doesn't effect the compiled code. That
> simple.


> In the case of the kernel, there is quite a bit of horrible coding
> style. But a working device driver for some hardware is always better
> that no working device driver for some hardware, and if enforcing the
> coding style more results is scaring away some driver writers, the
> style clearly loses.

It is a trivial fact that all coding styles are completely arbitrary.
Yes, there may be many things which are chosen because they make the
most sense, but there are always numerous choices along the way, all of
which would be reasonable, that have to be reduced to one. Some
philosophers will tell you that all of reality is completely arbitrary
and made up; of course, they're referring to our perceptions and choices
moreso than to, say, physics. Well, what exemplifies arbitrary reality
more than computer science? Every last drop of it was invented out of
whole cloth. So when you think about it, the C syntax itself is
arbitrary, and thus even moreso are the coding styles.

But we have a practical goal in mind here. Not only does something have
to WORK (compile to working machine code), but our grandchildren, using
Linux 20.14.6 are going to have to be able to make sense out of what we
wrote. Were it not for the fact that Linux is a collaborative project,
we would not need these standards.

So, yes, while it may seem silly to do it "just because K&R did it that
way", it is nevertheless a reasonable (albeit arbitrary) choice to make.
  Someone has to make the choice, enforce it, and make sure that
everyone understands it. If there is one style, then it will be easier
for new people to understand it once they have read the style guide.

Still, it IS nice to have someone produce justification for their
choices once in a while.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:21 EST