3 ms·
The one liner is the wrong conclusion. Why? 1) When using a debugger, it takes more effort to place a breakpoint on the inner statement. 2) If you want to in
by partycoder 9y ago
The one liner is the wrong conclusion.
Why?
1) When using a debugger, it takes more effort to place a breakpoint on the inner statement.
2) If you want to insert statements inside the if block you will be changing version control history for statements other than what you are modifying.
About 2, you may argue that this will be the case anyways because braces are not used... the solution to that is to always use braces.
Then there's another important aspect: handling error conditions is important part of your logic. Do not sweep them under the rug. Proper error handling is a big part of what makes applications robust, they need to be as readable as everything else.