Return *
Everything in moderation and moderation in everything. And with that in mind: Don’t return from multiple points in a method.
Everything in moderation and moderation in everything. And with that in mind: Don’t return from multiple points in a method.
Add New Comment
Viewing 3 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
When tidying up some code that had seriously evolved beyond its original purpose recently, one of the most useful and important things I did was consolidate and audit the return and exit paths, and make them sane and obvious. This really helped the clarity of the code.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
And that's enough about that.
Add New Comment
Trackbacks