Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Control Flow - Multiple returns or nested conditionals

by GotToBTru (Parson)
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2016-06-28 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (357 votes). Check out past polls.