Subject: Re: proposed new KNF [was Re: Time to update KNF?]
To: Luke Mewburn <lukem@cs.rmit.edu.au>
From: Ted Lemon <mellon@isc.org>
List: tech-kern
Date: 01/18/2000 11:39:57
> extern char *optarg;
> extern int optind;
> long num;
> int ch;
> char *ep;
I notice that you don't say anything about this horrible bletchery.
There shouldn't be any spacing after the type - it just makes the code
harder to read. This is of course rock solid fact, not opinion. :')
> ! * Put a tab after the first word, i.e. use "int^Ix;" and "struct^Ifoo *x;".
This seems like a bad idea, too, for the same reason - you break the
line, and the eye has trouble associating the type with the name.
> ! * Attempt to line-up the entries, using appropriate tabs and spaces.
Nononono! :')
This:
> ! struct foo *next; /* List of active foo */
> ! struct mumble amumble; /* Comment for mumble */
> ! int bar;
is even worse than this:
> ! struct foo *next; /* List of active foo */
> ! struct mumble amumble; /* Comment for mumble */
> ! int bar;
Yes, it looks pretty, but it's harder to read. The easiest thing to
read is to just say "struct foo *bar;".
I'm particularly upset that you changed this:
> !
To this:
> !
What were you *thinking*?!?
Wow, I see that this is one of your proposed changes. Please don't
make this change. This really decreases the readability of the code:
> ! extern char *optarg;
> ! extern int optind;
> ! long num;
> ! int ch;
> ! char *ep;
Regarding this:
> ! * Unary operators don't require spaces, binary operators do. Don't
-> and . are both binary operators... :')
I think there's such a thing as overspecifying how people should
code...
_MelloN_