4 ms·
Maybe I'm old, but i dont get it. I'd say signed is more dangerous as the overflow is undefined. And if you read to unsigned, you are just wasting range.
by Cloudef 4y ago
Maybe I'm old, but i dont get it. I'd say signed is more dangerous as the overflow is undefined. And if you read to unsigned, you are just wasting range.
- Retr0id 4y agoYes, that's the point. Signed ints are a potential footgun, which can be partially mitigated by limiting the range to 0 - 2^31-1. Good specs pre-emptively mitigate implementation bugs.
- deleted 4y ago[deleted]