On Fri, 29 Jan 1999, Warner Losh wrote:
> 
>       if ((a < 0) && (b < 0))
> 
Personally while I KNOW (after wasting a second thinking about it) that
the example below is the same as that above, I ALWAYS code as above.
It takes me about 1/5th the time to know what it means.

>       if (a < 0 && b < 0)

If I were working on this code  written by someone else it'd leave my
editor looking like the top example, that's for sure. I think that 
"How easy is it to edit a piece of code and still have it do what you
expect" is an important consideration, because people DO edit things.

> 
> 
> I do agree that complex things like:
> 
>       if (a | b & c % d ^ e)
> 
> should really have some parents to show what is going on.

I have NO idea of what that is doing and I have plans of looking it up in
the book to work it out..

> 
> So I agree with phk on this one: Use fewer parens generally, but use
> common sense in adding them in the more obscure cases where they do
> legitimately add readability.

OK so where is the line.. I find that in code I'm working on I have many
more
arens that you would like..
does that mean that I should be forced to take them out when I commit it
and therefore probably produce erorrs?

> 
> Warner
> 
> To Unsubscribe: send mail to majord...@freebsd.org
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to