I was assuming C2 would use something like c_int, c_short, c_unsigned_short etc för C?
Also, since the bit widths would be
same or equal to width of the corresponding values it should not run into issues.
So my argument is roughly:
- If one supports more than 8/16/32/64/128 widths, sure use i / u prefix. It's fine.
- If we only support 8/16/32/64/128 we're fine with a name that in C corresponds to a type with at least the given width
If we look at the types we have from c:
unsigned char = u8
signed char = i8
char = u8 OR i8 depending on architecture
short, short int = i16
int = min i16, i16 Win16, i32 on Win32, Win64, Unix, i64 on legacy Unix 64 bit
long, long int = i32 on Win16/32/64/ARM, i64 on Unix
long long = i64 on all platforms
Sorting away legacy systems we basically have:
char = u8 or i8
short = i16
int = i32
long = i32 or i64
long long = i64
The only place where we run into problems with assuming a bit width is "long" here. But since the proposal of long = i64 it's still at least the min size encountered *and* replaces long long for the most cases. "long" is a rather unnecessary type in C for most platforms today.
If char is kept then we have to decide on signed or unsigned anyway. Plus *java* has already standardized on these sizes with these names, as have C#.
If we want stuff like i24, i48 etc then sure, the bit size makes a lot of sense.