Wow, I'm simply blown away at the level of confusion.

I've been doing C for a long long time. Prior to C99 there was no boolean type in C. I have never missed it.

I have never ever seen a bug introduced by doing code like

if(foo)
or
if(!foo)

I have seen a large number of bugs introduced by programmers trying to "make" a boolean type for C and a lot of bugs introduced by trying to test for explicit trueness or nullness with code like

if(foo == true)
or
if(foo = NULL)

and so forth. I have also spent a lot of time devising clever macros to work around conflicting boolean types in other people's libraries.

All of the right things happen if you simply accept that zero in all of its forms is false and not zero is true. All of the trouble comes when trying to define what is true or trying to write a comparison expression when simply testing the value of the variable would do.

Put me firmly in the
if(foo)
camp. _______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to