httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c
Date Sun, 01 Aug 1999 18:44:56 GMT
Ben Laurie wrote:
> Or, alternatively, lecture me about C style when you've learnt it
> properly.

Oh, bollocks.  Style guides exist primarily to maintain/enhance
*readability*, not to defend anyone's personal preferences
and shortcuts.

Even if '!!foo()' were inarguably correct (and I don't think it is),
I don't believe it makes the expression any more readable.  In fact,
I think it's *less* readable than 'foo() != NULL'.

Why do you care?  The compiler should reduce both to the same
instructions (though you may actually find the '!!' construct turned
into extra instructions by a dumb compiler), so why not err
to the benefit of people who a) aren't as erudite as yourself
in C's ins and outs, and b) may have to maintain your code

I'm with Roy on this, definitely; 'foo() != NULL' has lower
cholesterol and is better for you, too. :-)
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <>
"Apache Server for Dummies" <http://ASFD.MeepZor.Com/>

View raw message