4 ms·
I find unsigned types more dangerous than signed bounded types. For unsigned types the edge-case is at 0, a frequently used number in eg. arrays. For signed typ
by rrobukef 9y ago
I find unsigned types more dangerous than signed bounded types. For unsigned types the edge-case is at 0, a frequently used number in eg. arrays. For signed types the edge-cases are at (random) positive and negative numbers.
Having to think more about edge-cases makes the code more dangerous:
for(uint i = arr.len()-1; i >= 0; i--) {...}
- masklinn 9y ago> I find unsigned types more dangerous than signed bounded types. So you do agree that signed bounded types are dangerous, and it's only a matter of degrees between them and unsigned. Thank you.