Re: while (1) vs. for ( ;; )
- From: akarl <fusionfive@xxxxxxxxx>
- Date: Tue, 30 Aug 2005 02:17:48 GMT
Charlie Gordon wrote:
"Chris McDonald" <chris@xxxxxxxxxxxxxxx> wrote in message news:detv2b$ael$1@xxxxxxxxxxxxxxxxxx
Ben Pfaff <blp@xxxxxxxxxxxxxxx> writes:
I would suggest that both while(1) and for(;;) are potentially unclear to a person (undergrad. student) seeing C for the first time (while assuming they haven't seen Java or C++, either).
OK, I suggest that while(true) is *clearer*.
BS
why not use the real clear thing :
WHILE (TRUE) { }
or even
WHILE (TRUE == TRUE) BEGIN ... END
with obvious macro definitions for dummies ;-)
In variable and function declarations the virtues of stdbool.h is clear. Compare
int isThisAPredicate;
and
bool thisMustBeAPredicate;
August .
- Follow-Ups:
- Re: while (1) vs. for ( ;; )
- From: Charlie Gordon
- Re: while (1) vs. for ( ;; )
- References:
- while (1) vs. for ( ;; )
- From: Michael B Allen
- Re: while (1) vs. for ( ;; )
- From: Chris McDonald
- Re: while (1) vs. for ( ;; )
- From: Ben Pfaff
- Re: while (1) vs. for ( ;; )
- From: Chris McDonald
- Re: while (1) vs. for ( ;; )
- From: Charlie Gordon
- while (1) vs. for ( ;; )
- Prev by Date: Re: while (1) vs. for ( ;; )
- Next by Date: Re: while (1) vs. for ( ;; )
- Previous by thread: Re: while (1) vs. for ( ;; )
- Next by thread: Re: while (1) vs. for ( ;; )
- Index(es):
Relevant Pages
|