Re:Pitfalls in C and C++: Unsigned Types (2011)
by detrino on Wednesday September 25, 2013 @06:15PM
(#6447676)
I think a lot of the pitfalls with unsigned types relates to the for loop construct being biased towards counting up. Consider the following code, the down for loop is really ugly and unintuitive, but the down while loop is symmetrical to the up loop. Maybe C/C++ need a counterpart to the for loop where the loop body executes last?
[ Parent
| on HN ]
There are no comments on this comment yet.