C Language Q & A #9
Why is boolean logic not available in C ?
- You can do Boolean logic (true - false type expressions) using relational expressions and integer data types. C’s designers had to make some decisions about what features to give the language. C does not have a Boolean data type variable available, so these other techniques can be used.
- Reasons for not having a Boolean data type in C are unclear. Creators may have wanted to keep the language as small and uncomplicated as possible (complicated enough already !). Adding a Boolean data type would give one more thing to learn how to use and more thing for the compiler writers to build and debug.
- It is interesting to note that the ANSI standardization committee did not see fit to add Boolean types to C in their committee effort to develop a standard version of the C language in the late 1980s.