Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rearrange code to remove early return
- Loading branch information
Anton Timmermans
committed
Jul 29, 2015
1 parent
5dfabde
commit 2e28c47
Showing
1 changed file
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2e28c47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Early returns / guard clauses are usually a good thing.
Why was this one removed?
2e28c47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, strongly disagree. Early returns & minimizing nesting levels are good.
2e28c47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for keeping me sharp.