Although I agree it'd be nice if GCC would flag ints used as bools
(and I believe that splint WILL flag this), I disagree strongly with:
if (foo == false) {...};
Over
if (!(foo)) {..};
Actually, I'd rather see:
if (!foo) ...
First, == false or == true is a chance to say = false or = true by
mistake.
Second, if (!is_whatever) is a lot more Englishy than is_whatever ==
false.
Third, the second is supported if we also add a standard that says all
booleans have a verb, such is "is_standalone" or "has_memory_cache"
rather than "standalone" or "memory_cache". The verb makes it clear
it's a boolean.
Thoughts? Are you persuadable?
xoa
--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp