Re: coding style (was Re: [PATCH][2.5] UTF-8 support in console)

john@grabjohn.com
Sat, 31 May 2003 17:06:21 +0100


> > Saving a line over readability is utterly bogus.

> I agree 100%. If you have anything more complex than
>
> if (error) return (error);
>
> I want it to look like
>
> if ((expr) || (expr2) || (expr3)) {
> return (error);
> }

Ergh, personally I hate reading code like that.

Having said that, I hate code that is indented. Am I the only person who mentally
counts, "in, in, in, out", etc, when reading code? Artificial indenting really
throws off my concentration, because the 'prompting' it provides does nothing to
help me, but the ragged left margin is irritating, and makes moving code around
awkward, because you have to correct the indenting to match the current, (actual),
nesting level of the code, (because indenting is a completely artificial concept).

I'm not trying to say my coding style is right, and yours is wrong, I'm just curious
:-).

John.
-
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/