2 ms·
> The second statement contradicts the first - int16_t is too specific and hides errors, but an arbitrary range is not? The arbitrary range is actually capable
by astrange 3y ago
> The second statement contradicts the first - int16_t is too specific and hides errors, but an arbitrary range is not?
The arbitrary range is actually capable of being correct. int16_t is almost never "correct", since it's larger than the actual range of values.
It can also be said to be an over-optimization, since on some platforms like x86 it's easier to deal with 32-bit values than 16-bit ones.
- archi42 3y agoThe compiler takes care of this kind of optimization via static analysis. And who said x86? You're right, but what about Power9 register windows vs the three-and-a-half brain cells of x86? I'm not in the mood of discussing this or convincing you otherwise. If you made up your mind to use int over intWhatever_t then so be it. We're not working on the same project and I suppose you're not building anything that might kill me.