On Wed, Sep 1, 2010 at 11:06, Brandon McCaig <[email protected]> wrote:
> On Mon, Aug 30, 2010 at 2:25 AM, Uri Guttman <[email protected]> wrote:
>> but i never use until anyhow. i use unless a fair amount as i don't like
>> if ( ! EXPR). my current boss has asked me to stop using unless but i am
>> not stopping.
>
> It seems silly to use unless, but never use until. :) I think both
> make the code more clean and readable, at least for native English
> speakers.
snip
I will occasionally use until, but it rarely seems to be needed. I
use unless all of the time.
One reason is that you often have one variable you are testing a
while/until loop:
while ($continue) {}
until ($stop) {}
It seems natural to set the variable to true when you start and false
when you want to stop. Of course, the counter argument is that
until ($found) {}
makes more sense than
while ($notfound) {}
But I guess the habit of just adding not to the variable name is too
ingrained in me at this point.
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/