Subject: Re: scan_ffs from OpenBSD ported and improved.
To: None <tech-userlevel@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 06/06/2005 23:27:16
> I leave them as is because I think they are better to understand IMHO
> (der mouse said so too).
That's not quite what Mouse said, nor, even if it were, does it
necessarily mean you should do as I suggest.
First, I didn't say anything about your particular code. I said that
there are cases where breaking the rules produces clearer code than
following them, with the associated comment that turning the guidelines
into straitjackets is a Bad Thing; I haven't looked at your code, so I
don't have an opinion as to whether it's such an instance.
Second, I am not authoritative about this stuff with respect to what
goes into NetBSD, not by any stretch of the imagination.
There are a number of points on which I disagree with
/usr/share/misc/style; dogmatism about whitespace was just the one I
happened to mention. There are only two points on which I really think
it is out-and-out wrong: (1) the use of old-style definitions, since
they are incompatible, in general, with prototyped declarations (I
think gcc is wrong to allow a prototype to rewrite an old-style
definition into the related prototype definition...it's an invitation
to write broken code by making it appear to work) and (2) encouraging
the use of NULL, which my code-reading experience indicates is
significantly harder to use correctly than bare 0.
If anyone really cares, I can do a full ripping-apart of .../style, but
this probably is not the thread to do so in - indeed, I'm not sure it
should be done on any of the lists at all.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML email@example.com
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B