Rockbox mail archiveSubject: Re: Read errors
Re: Read errors
From: Linus Nielsen Feltzing <linus_at_haxx.se>
Date: Fri, 14 Mar 2003 10:59:16 +0100
Henrik Backe wrote:
>>I don't see the difference. The if(func()) and the if(0 != func()) are
>>the same thing, and I prefer the first one, because there is less fluff.
>>The only issue is the "polarity" of the return code.
> The only difference between them is that one contains hidden magic.
Magic? Not at all. C is not magic. The if(func()) construct is a de
facto standard in the C language. Look around you, this is how C is
written, like it or not. I prefer C code that is written like that,
because then it looks like any other C code.
If you write it differently, the C programmer has to look twice to see
what the programmer has intended to do, since the construct is not the
usual one. Constructs like if(0 != func()) catches my eye and leads me
to thing "uh uh, this looks fishy, what is he trying to do?".
Received on 2003-03-14
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew