All of the following are contemporary "standard" C data types:
- bool
- char
- int32_t
- float
- double
From a naming convention point of view, can you spot the odd man out?
Yes, only the int32_t has a _t at the end. Why not bool_t, char_t, float_t, etc. Why is the intnn singled out to have the burdensome and unsightly _t at the end?
Surely int32 is enough. Yes, I know I can place in my code:
typedef uint32_t uint32
typedef int32_t int32
typedef uint8_t uint8
typedef uint8_t uint8
and all is well, but why doesn't the C11 standard follow a consistent naming convention?
[I’ve left 16 bit and 64 bit variants out since I don’t use 16 bit data types and, if I do need a 64 bit data type, I’ll add it]
What are people's views on using int32 instead of int32_t (damn I hate typing _, it's an awkward hand maneuver!)?
If I use int32 (instead of int32_t) am I damning future maintainers of my code to frustration/confusion?