Wouldn't it have made more sense to make long 64-bit and reserve long long until 128-bit numbers become a reality?
Yes, it does make sense, but Microsoft had their own reasons for defining "long" as 32-bits.
As far as I know, of all the mainstream systems right now, Windows is the only OS where "long" is 32-bits. On Unix and Linux, it's 64-bit.
All compilers for Windows will compile "long" to 32-bits on Windows to maintain compatibility with Microsoft.
For this reason, I avoid using "int" and "long". Occasionally I'll use "int" for error codes and booleans (in C), but I never use them for any code that is dependent on the size of the type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With