No problem
Your concerns are right!
You normally have to include stdint.h, so it might be not handy. For Kernel-purposes (which is not the case here, because it's Mesa), you could just replace them with char's.
It boils down to the point that stdint.h just typesets uint_fast8_t to char on x86_64, it is mostly relevant only to other architectures where other 8 bit datatypes might be faster.
It's always better to know about these types, because they can really make the difference! People should really be encouraged to think about the variable-ranges and use those smaller integers accordingly, instead of just declaring everything an int.
This approach comes close to Ada, one of the safest languages in existence, where the range of each variable can be strictly limited.
Originally posted by oliver
View Post
You normally have to include stdint.h, so it might be not handy. For Kernel-purposes (which is not the case here, because it's Mesa), you could just replace them with char's.
It boils down to the point that stdint.h just typesets uint_fast8_t to char on x86_64, it is mostly relevant only to other architectures where other 8 bit datatypes might be faster.
It's always better to know about these types, because they can really make the difference! People should really be encouraged to think about the variable-ranges and use those smaller integers accordingly, instead of just declaring everything an int.
This approach comes close to Ada, one of the safest languages in existence, where the range of each variable can be strictly limited.
Comment