Single statement if block - braces or no? [on hold]
- by Zannjaminderson
Which is better/more generally accepted?
This:
if(condition)
{
statement;
}
Or:
if(condition)
statement;
I tend to prefer the first one, because I think it makes it easier to tell what actually belongs in the if block, it saves others from adding the braces later (or creating a bug by forgetting to), and it makes all your if statements…