Originally posted by Bear Bibeault: but I won't do: If it's not on the same line, it gets the {}'s.

I second that. Even as a Groovy programmer, where the syntax tends to be more terse, I will never omit the {}'s over a statement stretched multiple lines. It just makes things more confusing. [ September 22, 2008: Message edited by: Matthew Taylor ]

Originally posted by Jeanne Boyarsky: On page 91 on "Clean Code", Uncle Bob lists out his preferred formatting rules. I noticed he doesn't use {} if there is only one statement. I'm curious what the advantage of this is.

I've heard and seen the disadvantage - that someone will add a second statement without remembering to add the {}.

To me, there is another disadvantage: I need a more complex regular expression in my head to be able to parse the code.

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus