There's one significant advantage (from the reader's point of view) to while (1):
The meaning of while (1) is straightforward to deduce by someone who has never seen it, whereas the meaning of for (;;) is not.
There are minor advantages (from the reader's point of view) to for (;;):
for (;;) has no expression to read, while while (1) does. (Note the addition of loop { ... } in Perl 6.)
"(;;)" can be read as "ever". "For ever" sounds better than "while one", "while true" or "while ever" (and requires no mental backtracking). "While not done" would be a great reading, but translating "1" to "not done" is a stretch.
for (;;) is visually distinctive from naturally ending loops.
Update: hum... while (!0) could be read as "while not done"...
In reply to Re^4: last in a do while loop (for (;;))
by ikegami
in thread last in a do while loop
by gam3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |