Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Perl style question: loops with postcondition

by hsmyers (Canon)
on Jun 28, 2002 at 20:04 UTC ( [id://178123]=note: print w/replies, xml ) Need Help??


in reply to Perl style question: loops with postcondition

I'd go with do { } while($condition); since the other two violate some of my own pet peeves. I don't like invariants in place of conditions-- too easy for me to miss let alone the poor fool who is maintaining my code. If I need a GOTO fix, I'll code in assembler. Besides the first construct has fewer semantic elements to screw up!

–hsm

"Never try to teach a pig to sing…it wastes your time and it annoys the pig."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2025-05-20 03:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.