if(SomeCondition) {
return;
}
This,
1, Less error prone.
2, Easy to add debug code.
For example, if SomeCondition is a function call or a complex expression, I want to see why it return true (because it should return false in normal process), then I can add one line before return temporarily,
if(SomeCondition) {
SomeCondition;
return;
}
Then I can set breakpoint there to repeat the condition to see what' s wrong.
3, AFAIR, sometime a return without brackets can't be breakpointed on some compiler and debuggers? Can't remember clearly though.