I am currently reading a draft of the C11 specification. The new introduced keywords: _Bool, _Alignof, _Atomic
all feel like custom extensions, instead of standard reserved keywords like struct, union, int
.
I realize that the standard basically consists of standardized extensions ... but still, this is awful! Maybe we will soon end up with __Long_Long_Reallylong_Integer_MSVC_2020_t
creeping in the standard!
Is the backward compatibility of nonstandard code the only reason of the new style of the keywords?
<stdbool.h>
header file must include a preprocessor macro such as#define bool _Bool
. This is a neat solution as it retains backwards compatibility, but allows any new code, which includes the new header file, to use the more attractive syntax.