On Mon, 25 May 1998, Pete Ryland wrote:
>Don't be fooled! Just because it looks smaller in your c source, it
>doesn't mean it'll be faster. It *should* generate the same code, so the
Heheheheh it' s faster to type ;-). This should be the only reason ! is
been implemented in C and I take advantage of it.
>only reason to use one way over another is code readability. IMHO, I
>think that Glynn's code is more readable, since it helps you realise that
>the condition will be true if the strings are equal. Similarly for
>checking of error conditions or null pointers, I think that a compare with
NOTE NOTE NOTE a lot of people think that NULL is is (void *) 0. This is
false. NULL is a page not allocated in the TLB. We can' t use ! for NULL
pointers since we must always use == NULL or != NULL. I didn' t want to
say that.
>zero makes c code much more readable. (of course this is just my 2c which
>ain't worth much since the smallest unit of currency here is 5c :)
>
>Can you explain why you think it is "nicer", please?
I like more ! that == 0, looks me more pretty, nothing more, but this is
very personal...
Andrea[s] Arcangeli