On Mon, 17 Nov 2014 14:10:49 -0800
Bobby Powers <bobbypow...@gmail.com> wrote:

> By default I read  if (!functioncall()) as 'if the function call
> failed'.  I like the (strcmp(p, q) == 0) idiom because I don't fall
> into the trap of reading the statement as 'if the string comparison
> failed'.  It is the one case I can think of where I prefer an explicit
> comparison to zero.

De gustibus non est disputandum.

However, given strcmp is such a special case, I was used to the == 0
idiom as well.
However, the more I used the ! the easier it was to read it.

Cheers

FRIGN

-- 
FRIGN <d...@frign.de>

Reply via email to