Absense of bool



First of all: I love C and think that it's beautiful. However, there is
at least one MAJOR flaw: the lack of a boolean type.

OK. Some of you might refer to C99 and its _Bool (what's up with the
uppercase 'B' anyway?) and the header you can include (apparently) to
get a real "bool". This isn't my point, however -- it should have been
there from the beginning.

Char is a small int. We all know that. However, "char some_bool = 0;"
simply feels wrong, and I think that most of you agree. Plus, it's
still too large.

"int some_bool = 0;" is what I -- and everyone else, I assume -- use
for bools. But an int is a very large data type for something that will
only ever be true or false (1 or 0). This really, really bugs me.

Why, back when C was designed, didn't they see a reason to build in a
boolean type into the language? Now it matters less, I guess, but back
then, there should have been very strong technical reasons. It just
doesn't make any sense whatsoever to me.

I have asked many people about this for quite some time, and they are
all just telling me that I'm silly for bringing it up. Why? It's not
that I NEED a bool to get anything done -- it's the principle. Saving
resources and coding a little more prettily is a Good Thing (TM) IMO.

So... can somebody properly explain this to me once and for all? I'm
sure there MUST be a logical explanation that nobody seems to really
understand. The madness must end.

bool some_bool = 0; /* How great it would be... */

.



Relevant Pages

  • Re: Absense of bool
    ... is at least one MAJOR flaw: the lack of a boolean type. ... At best this is a minor irritation, not a major flaw IMHO. ... there should have been very strong technical reasons. ... Because bool is too often an overrated type. ...
    (comp.lang.c)
  • Re: The lack of a boolean data type in C
    ... the lack of a boolean type. ... Some of you might refer to C99 and its _Bool (what's up with the ... uppercase 'B' anyway?) ... there should have been very strong technical reasons. ...
    (comp.lang.c)
  • The lack of a boolean data type in C
    ... at least one MAJOR flaw: the lack of a boolean type. ... Some of you might refer to C99 and its _Bool (what's up with the ... there should have been very strong technical reasons. ...
    (comp.lang.c)
  • Re: The lack of a boolean data type in C
    ... the lack of a boolean type. ... Some of you might refer to C99 and its _Bool (what's up with the ... Have some different structure with two pointers: ... pointers do not work with those arrays, ...
    (comp.lang.c)
  • Re: The lack of a boolean data type in C
    ... the lack of a boolean type. ... Some of you might refer to C99 and its _Bool (what's up with the ... there should have been very strong technical reasons. ...
    (comp.lang.c)