On Mon, Mar 30, 2009 at 10:54:58PM +0300, Avi Kivity wrote:
> Blue Swirl wrote:
>>> +4. Block structure
>>> +Every indented statement is braced; even if the block contains just one
>> I'd remove this, braces are not used consistently for one statement blocks.
> While that's true, I'd like to keep this. I found (after initially
> being annoyed by this; I dislike punctuation) that it's nice not to need
> to rebrace after adding or removing lines.
I hate having to add braces to add a printf when debuging something.
If you forget the braces, you change the meaning of the code. To me
that's a disaster and enough reason that leaving out braces should
be banned. Code style that encourages creation of bugs is bad style.
Surprisingly many code styles don't get this however.
I also like consistency, and since you need braces for multiline
statements, why not always use them?