K
kid joe
Hi all,
I know that from a C point of view, the bool or __Bool type was introduced
into C to standardize common practise in existing compilers, but from a
historical perspective does anyone understand what was the motivation for
languages like C++ and Java (and eventually C) to have a seperate type for
boolean variables instead of just using ints?
It seems pretty illogical to me, since I dont believe theres any common
hardware where individual bits can easily be addressed, so whats the gain
from having a type thats essentially an alias for int at the hardware
level, versus the added complexity for compiler writers and programmers?
Cheers,
Joe
I know that from a C point of view, the bool or __Bool type was introduced
into C to standardize common practise in existing compilers, but from a
historical perspective does anyone understand what was the motivation for
languages like C++ and Java (and eventually C) to have a seperate type for
boolean variables instead of just using ints?
It seems pretty illogical to me, since I dont believe theres any common
hardware where individual bits can easily be addressed, so whats the gain
from having a type thats essentially an alias for int at the hardware
level, versus the added complexity for compiler writers and programmers?
Cheers,
Joe