Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 1999 09:48:19 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Warner Losh <imp@village.org>
Cc:        Andrew Kenneth Milton <akm@zeus.theinternet.com.au>, current@FreeBSD.ORG
Subject:   Re: btokup().. patch to STYLE(9) (fwd) 
Message-ID:  <Pine.BSF.4.05.9901290941240.304-100000@s204m82.isp.whistle.com>
In-Reply-To: <199901291608.JAA66178@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help


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 majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
> 


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901290941240.304-100000>