httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthreadmpmt_pthread.c
Date Sat, 31 Jul 1999 14:02:54 GMT
Rasmus Lerdorf wrote:
> 
> > Phooey. If you think working out what "not not" means is mental
> > gymnastics, its obviously time you stopped wanking.
> >
> > Imposing your preferred style on people without due process is
> > incredibly lame. I hate comparing to NULL. NULL is FALSE. Everyone knows
> > that (everyone with a clue, that is).
> 
> !!getenv() is not something you see every day and thus even clueful people
> will have to look twice.  Heck, someone might even assume it is a typo and
> yank the second ! there.

Anyone who "fixes" code by assuming things deserves what they get.

>  Given the fact that comparing to NULL should
> cause the compilers to produce the same code I don't see what is so bad
> about being verbose and perfectly explicit here.  It is a bit more typing,
> but it would allow even clueless people to read the code more easily.  ie.
> it would let me play too.

You make the assumption that != NULL is easier to understand than !!. I
find them about equally easy to understand, and, as I said, I don't like
comparing to NULL. I don't see != NULL very often either, because if(x
!= NULL) is lame, you should just use if(x), and that was my point - !!x
keeps it in tbe purely boolean domain. Its just aesthetics.

Actually, now I think about it, I always find !=/== NULL confusing. I'm
never quite sure which way round is right without concentrating.
Something wrong with me, I guess.

But I really don't give a shit. If people want != NULL instead of !!
they are welcome (so long as they don't start using it in if()s).

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Mime
View raw message