I
Ioannis Vranos
Since there is the need of a new 64-bit integer type, the approach taken
should be extensible.
What about introducing int64 being exactly 64 bit, int32 being exactly
32 bits and int16 being exactly 16 bits, and making short and int
equivalent to int16, and long being equivalent to int32?
My proposal more thoroughly:
int16 is introduced and is an exact 16-bit type (of course additional
padding bits are allowed). int and short become equivalent of it.
That is, signed int16, int16, signed, signed int, int, signed short,
short to be all equivalent. The same for the unsigned equivalents. That
is unsigned int16 to be the same as unsigned int and unsigned, etc.
int32 is introduced and holds exactly 32-bit values. long becomes
another name of it, as was the case with the above.
signed int32, int32, signed long, long are all the same.
unsigned long is another name of unsigned int32.
int64 is introduced and holds 64-bit values. signed int64 is equivalent
and unsigned int64 is the unsigned type.
So we can say:
int64 x;
vector<int32> someVector;
list<unsigned int64> someList;
int32 *p = new int32[10];
long *pp = p;
etc.
should be extensible.
What about introducing int64 being exactly 64 bit, int32 being exactly
32 bits and int16 being exactly 16 bits, and making short and int
equivalent to int16, and long being equivalent to int32?
My proposal more thoroughly:
int16 is introduced and is an exact 16-bit type (of course additional
padding bits are allowed). int and short become equivalent of it.
That is, signed int16, int16, signed, signed int, int, signed short,
short to be all equivalent. The same for the unsigned equivalents. That
is unsigned int16 to be the same as unsigned int and unsigned, etc.
int32 is introduced and holds exactly 32-bit values. long becomes
another name of it, as was the case with the above.
signed int32, int32, signed long, long are all the same.
unsigned long is another name of unsigned int32.
int64 is introduced and holds 64-bit values. signed int64 is equivalent
and unsigned int64 is the unsigned type.
So we can say:
int64 x;
vector<int32> someVector;
list<unsigned int64> someList;
int32 *p = new int32[10];
long *pp = p;
etc.