Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Apr 2002 02:42:09 -0500
From:      Mike Barcroft <mike@FreeBSD.ORG>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        "M. Warner Losh" <imp@village.org>, jake@locore.ca, dillon@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/i386/i386 critical.c src/sys/i386/include cpufunc.h critical.h src/sys/i386/isa apic_vector.s icu_vector.s src/sys/kern kern_fork.c kern_proc.c kern_switch.c src/sys/alpha/alpha critical.c src/sys/alpha/include cpufunc.h ...
Message-ID:  <20020402024209.B19806@espresso.q9media.com>
In-Reply-To: <200204020428.g324SkE14265@apollo.backplane.com>; from dillon@apollo.backplane.com on Mon, Apr 01, 2002 at 08:28:46PM -0800
References:  <200204012351.g31NpO890339@freefall.freebsd.org> <20020401.175136.106024419.imp@village.org> <20020401201130.K207@locore.ca> <20020401.181628.15900667.imp@village.org> <200204020428.g324SkE14265@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon <dillon@apollo.backplane.com> writes:
>     Remember, folks, we aren't robots here.  Style(9) is useful as a guide
>     but that is about as far as it goes.  There is a lot of silly junk in
>     there and it wastes everyones time to natter on about it, not to mention
>     committing little tweaks to other people's code.  It's one thing for
>     us, as a community, to decide to get rid of __P() for example (which I
>     agree with), quite another to make annoying little commits changing minor
>     things to pieces of code that you are not otherwise working on. 

IIRC, BDE has advocated fixing indent(1) so that commits can just be
piped through them.  This would solve most problems.

>     Style(9) makes me think that somebody is trying to make programmers
>     write code like automatons rather then like people.  For example, it
>     advocates utterly ridiculous, unreadable messes like this:
> 
> 	if (a) {
> 	    x;
> 	    y;
> 	} else 
> 	    /*
> 	     * HITHERE!
> 	     */
> 	    b;

This looks better with proper 8 character tabs.  I think in KNF extra
braces are normally used in situations like this, but this is an edge
case.

>     Which actually exists in the FFS code somewhere.  Unbelievable.
> 
>     This business about declaration placement is really in the eye of the
>     beholder.  I'm sure the older people remember compilers breaking on
>     sub-block declarations, but I have not personally seen that sort of
>     breakage in many years.  It is also easy to go too far the other way,
>     and I will readily admit that my 'mask' declaration in three side-by-side
>     sub-blocks was kind of silly.  But, that said, it made far more sense to
>     move it up one level rather then move it up all the way to the top of
>     the procedure.  I can't tell you how difficult it is to read and
>     understand a procedure that makes 30 declarations at the top, many of
>     which are used just once or twice somewhere deeply nested in the middle.
>
>     Yuch.  It's as though code modularity ends at the procedure boundary
>     for a lot of people. 
> 
>     I'm not saying that people can't do cleanups of my code, but at the
>     very least if it is something I committed recently you should email me
>     a heads up and make sure the file isn't still under active development.
>     And I *DO* draw the line.  I'll suffer splitting assignments off of
>     the declaration, the removal or addition of blank lines between
>     comments and code, and I'll even suffer the absolutely ridiculous blank
>     line placed after a procedure's open brace when a procedure has no
>     declarations.  BUT, I draw the line at moving variable declarations
>     around or removing braces that were emplaced to make the code more
>     readable.

C99 adds even more ways to obfuscate code (for instance, allowing
variable declarations anywhere in a code block, not just at the top).

Best regards,
Mike Barcroft

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020402024209.B19806>