Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Control Flow - Multiple returns or nested conditionals

by GotToBTru (Prior)
on Oct 07, 2010 at 21:41 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-03-29 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found