3 ms·
Stubborn and ignorant use of int where size_t is needed
- DiabloD3 12y agoI really wish people would stop using int instead of size_t. Even if they used a literal long instead of a size_t that'd be a vast improvement. Stop trying to micro-optimize your C, you can't win here anymore on 99.9% of your code.
- deleted 12y ago[deleted]
- gnachman 12y agoI'm not sure the number of bugs actually encountered by users would decrease if everyone started using size_t tomorrow. What value is more likely to be found: INT_MAX+1 or -1? Even something simple like iterating backwards over a string is bug-prone with unsigned types.