Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
ternaryoperator
· 11y ago · 0 comments
In the first versions of C, 'true' was not a keyword, so for(;;) was the way an endless loop was encoded. After that, it became the convention.
Comments
[–]
machosx
11y ago
Why not just use while(1)?
[–]
ufo
11y ago
Personal preference. Some people think "for(;;)" looks nicer.
[–]
z92
11y ago
the "for" version is also shorter by a single byte.