I agree in principle that using semantic type aliases is better than using specific widths directly everywhere.
However, realistically speaking, you'll never get the C++ community to consistently use semantic aliasing. C++ is taught with
int and
float from the ground up; people are accustomed to using fundamental types directly. It won't ever fully catch on for the same reason almost everyone uses the
<i> tag to make their text italic, rather than using
<em>,
<dfn>, <var>, or other semantic tags that render the same (by default) but carry more information. The outcome is the same, so it's hard to get people on board for rather abstract reasons.
Also, when a fixed-width integer appears for ABI reasons, or because your
uint32_t represents four bytes to be deserialized in a protocol or file format, then that
uint32_t can virally propagate into the rest of the program. You have to be quite consequential to define points where your
uint32_t turns into
index_type. Semantic aliasing is also a practice that's quite specific to C++. For example, Kotlin uses
Int everywhere in the standard library, JavaScript uses number, Python uses
int, etc.
Given the reality of the situation, we may as well provide shorthands like
std::u8, but not for std::uint8_t as I've previously explained (_BitInt would be a better candidate).