develooper Front page | perl.perl5.porters | Postings from May 2006

Re: [PATCH] removing one-line for and while loops

Thread Previous | Thread Next
From:
Andy Lester
Date:
May 2, 2006 08:54
Subject:
Re: [PATCH] removing one-line for and while loops
Message ID:
CE4BB6DC-4FA6-4ABD-8C1C-CEB3B7EF7475@petdance.com

On May 2, 2006, at 10:50 AM, Rafael Garcia-Suarez wrote:

> Andy Lester wrote:
>> -	for (t = s; !isSPACE(*t); t++) ;
>> +	for (t = s; !isSPACE(*t); t++)
>> +	    NOOP;
>
> I think I tend to find this kind of changes overkill, almost
> to ugly. In my code, I usually put a lone ; on the next line.
> Isn't this sufficient ?

Ordinarily, yes, but then my lint complains that it's an empty loop.   
Note that the NOOP expands to a lint directive.

xoxo,
Andy

--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About