[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: removing unnecessary parentheses in #if defined (FOO)
From: |
Bruno Haible |
Subject: |
Re: removing unnecessary parentheses in #if defined (FOO) |
Date: |
Tue, 24 Jan 2006 19:57:56 +0100 |
User-agent: |
KMail/1.5 |
Jim Meyering wrote:
> you must admit the
> parentheses in `#if defined (SYM)' add next to nothing in readability,
> and actually detract as soon as you end up adding another layer of
> parentheses:
>
> #if (defined (S1) || defined (S2)) && defined (S3)
I agree with this. If this were the only piece of C code that exists,
then of course its readability would behave as you say.
The other point is that readability depends on what the reader is used to,
or is familiar with.
you what than way opposite the in written is that sentence a Reading
its do cannot brain reader's the because Simply .hard is to used are
.way usual the matching pattern
This is also the reason for the existence of the GNU coding style: code
is easier to read if it follows the usual visual and semantic patterns.
Bruno
Re: socket.h, Simon Josefsson, 2006/01/24