Anthony Sorace wrote: > i think that's the wrong question. i know plenty of people who believe > C suffers from its lack of a formal boolean type, but the correct > question for folks like standards bodies (and the peanut gallery here, > for whatever we matter) is whether adding it (in any particular form) > justifies the cost (in terms of added complexity, architectural > mismatch, monetary cost of implementation, or whatever criteria one > chooses) of adding it to the standard.
How hard would it be to add the following to the directory where standard headers are kept? /* stdbool.h -- almost conforming implementation for pre-C99 environments */ #ifndef __bool_true_false_are_defined #define __bool_true_false_are_defined 1 /* program is allowed to contain its own definitions, so ... */ #undef bool #undef true #undef false #define bool int #define true 1 #define false 0 #endif /* !defined(__bool_true_false_are_defined) */ This provides 99% of the Boolean functionality that is actually used by C99-based applications without having to implement _Bool at all.
