Date: Thu, 30 May 2002 13:58:42 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: John Baldwin <jhb@FreeBSD.org> Cc: Matthew Dillon <dillon@apollo.backplane.com>, FreeBSD current users <current@FreeBSD.ORG>, David O'Brien <obrien@FreeBSD.ORG>, Julian Elischer <julian@elischer.org> Subject: Re: Seeking OK to commit KSE MIII Message-ID: <3CF69282.F60E22FD@mindspring.com> References: <XFMail.20020530105952.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote:
> This is your opinion not gospel truth.  The reason I and others leave out
> braces except when they are needed is to minimize the number of wasted
> vertical space so that more code can fit on a screen at a time.  This is
> the same reason for using
> 
> if (foo) {
>         ...
> }
> 
> Instead of:
> 
> if (foo)
> {
>         ...
> }
Actually, that's a tools issue; specifically, it has to do with
"%" and "$" in "vi".
Just like:
	int
	foo( x)
instead of:
	int foo(x)
Has todo with "grep ^name <all the sources>" for function
declatation finding, vs. references.
As for "extra braces", I've seen people do:
	#if foo		/* { */
		...
	#else		/* !foo } { */
	#endif		/* !foo } */
To let people use statement start/end block matching on "#if", too.
Our tools dictate a lot of what people say constitutes "style", but
what really works out to be "efficient use of tools".
-- Terry
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?3CF69282.F60E22FD>
