Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: do {$i++} until vs. $i++ until

by wade (Pilgrim)
on Mar 25, 2008 at 04:49 UTC ( [id://676051]=note: print w/replies, xml ) Need Help??


in reply to do {$i++} until vs. $i++ until

For what it's worth, 'Perl Best Practices' isn't so hot on until statements, either (though I find your, specific, examples pretty easy to read). 8o)
--
Wade

Replies are listed 'Best First'.
Re^2: do {$i++} until vs. $i++ until
by jethro (Monsignor) on Mar 26, 2008 at 00:55 UTC
    Conway's main critizism isn't readability (the methods of avoiding it diminish readability as much as the do-loop IMHO).

    The main problem he sees is that the do-loop isn't a real loop, so that 'next','last' statements are not working as expected. He is absolutely right, but I still use do-loops sometimes, especially in small loops where the rewrite would blow up the loop significantly.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://676051]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-16 10:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found