Y
Hacker News
new
|
ask
|
show
|
jobs
by
kazinator
2682 days ago
I follow the opposite rule. If any branch of a compounded `if/else` is braced, then so shall all of the others.
1 comments
jlg23
2682 days ago
A little further down in the document linked: "This does not apply if only one branch of a conditional statement is a single statement; in the latter case use braces in both branches:"
link