Agreed.
> 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/