In u32/s32u means “unsigned (integer implied)” and s means “signed (integer implied)”, these are antonyms and this is ok. In u32/i32u, again, means “unsigned (integer)” and i means just “integer”, which is a bit inhomogeneous, it’s about different things.
Of course, I can always redefine this with const s32 = i32;, but, anyway, why i32 but not s32? After Rust?
Integer in math can be positive or negative, that justifies the i prefix. Also Natural Number is a better name for positive numbers. n32/i32 is the best
I believe that i comes from C int and u comes from C unsigned.
Yes, but integers in a computer may be signed or unsigned (and it is very important for a programmer, but not for a mathematician), that justifies u32/s32. It’s not my “invention”, as you guessed… Linux kernel uses such typedefs.
Linux picked the less usual convention, but the whole u16 / u32 / i16 etc. thing has a really old history in C. If you needed integer types of a defined width, you used to have to do some platform specific macro trickery to get them in a portable way.
That’s why the later standard went with the more verbose uint8_t thing actually, so it wouldn’t interfere with the shorter versions which were already in heavy use in existing code.