OT: for(;;) vs while(1)

Matthew Stoltenberg d3matt at gmail.com
Mon Nov 1 03:49:20 UTC 2010


>> > I still viscerally cringe when I see while (1) instead of for(;;).  I'm aware
>> > that modern optimizers take it out, but when there is a way to state exactly
>> > what you want the code to do and you choose to instead say something you
>> > _don't_ want the code to actually look like, I don't understand why.  Oh well.
>>
>> I'm interested in this point, but can't find any arguments or discussion
>> on the for(;;) vs while(1) issue.  It is just a style preference, i.e.,
>> a religious issue?
>
> Yes.
>
>> I have seen for(;;) promoted over while(1), but why?
>
> No reason.
So it never mattered or doesn't matter now?  :)


More information about the busybox mailing list