Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Control Flow - Multiple returns or nested conditionals

by GotToBTru (Prior)
on Oct 07, 2010 at 21:41 UTC ( #864099=note: print w/replies, xml ) Need Help??


in reply to Control Flow - Multiple returns or nested conditionals

My preference is the nested conditionals. It encourages and facilitates reviewing the entire logical flow if/when you add other conditions. With multiple return points, if the code was modified extensively over time, I would worry about ending up with orphaned parts of the code.
  • Comment on Re: Control Flow - Multiple returns or nested conditionals

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://864099]
help
Chatterbox?
What's the matter? Cat got your tongue?...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-04-30 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (535 votes). Check out past polls.