Multiple Returns from a Single Method
A discussion of the benefits and disadvantages of single vs multiple returns from a method cropped up today. Unfortunately we became distracted before getting to the meat of the opinions. To help stir up that discussion again, here’s a link to an article (and follow-up comments) from Mark Levison’s blog.
Notes from a Tool User: Multiple Returns from a Single Method
Steve wrote:
Multiple returns are fine if they are all clustered around one place – the top. Also, the single return is fine as long as it doesn’t bend you into a pretzel with regard to indentation.
I really hate having to pencil in lines on a printout between curly brackets to find what’s going on!
Posted on 29-Aug-08 at 7:46 pm | Permalink