Re: Lindent fixed to match reality

Theodore Ts'o
2004-01-30T14:48:12Z

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