news
18
Iterating Backwards in C
2026-10-30Readers discuss the C idiom "while (i --> 0)" for backward iteration, including unsigned-safe variants like "while (i-- != 0)" and comparisons to conventional for-loops. The discussion frames the trick as clever but potentially useful, linking it to a classic Stack Overflow post and noting its long-standing use despite readability tradeoffs.
Comments
0Discuss on Hacker NewsOnly full members can comment
Log in to express your opinion.
No comments yet.