Re: Lindent fixed to match reality

From: Theodore Ts'o
Date: Fri Jan 30 2004 - 09:49:00 EST


On Fri, Jan 30, 2004 at 12:43:36AM +0100, David Weinehall wrote:
> "Everyone" also sprinkles far too many parenthesis for their own code,
> just to be sure. I've seen code such as
>
> a = b * c + 1;
>
> written as
>
> a = ((b * c) + 1);
>
> The question is rather, why should you insert superfluous parenthesis
> when they do no semantic difference, and do not improve readability in
> any way?

I disagree; sometimes adding a few extra parenthesis *does* improve
readability, especially if the expression is complex. Of course, if
it's that complex, you might be better off defining a few extra
variables and having named sub-expressions (it shouldn't make a
difference to a good compiler).

- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/