News for hackers. Stuff that matters.
Re:The Beauty of Bresenham's Algorithm by biot on Tuesday August 07, 2012 @10:10PM (#4353502)
According to the C99 standard [0], an omitted optional expression-2 in a for loop is replaced by a non-zero constant. Thus, for(;;) is equivalent to for(;1;) which is effectively equivalent to while(1) as there are no other declarations or expressions. And, for those who are counting, it also saves a character.

[0] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf (See 6.8.5.3)

Re:The Beauty of Bresenham's Algorithm by ThePherocity on Wednesday August 08, 2012 @12:30AM (#4353909)
Why would anyone wreck legibility to save a character?
Re:The Beauty of Bresenham's Algorithm by dbaupp on Wednesday August 08, 2012 @01:55AM (#4354162)
I don't think it wrecks legibility, since it's a C idiom. People reasonably experienced in C will read "for (;;)" as an infinite loop just as well as "while(1)". That said, it might be a little confusing for beginners (or others who don't use C very regularly).
Re:The Beauty of Bresenham's Algorithm by Jimmie on Wednesday August 08, 2012 @01:06AM (#4354020)
Ahhh, the ole' semicolon debate.