I prefer to use braces for one and multiple liners – I've seen one too many 
projects go south because a developer got confused with his own statements.

Oskar

On 20 Feb 2010, at 21:49, Trevor Orr wrote:

> My preference is to always use the { } no matter how many statements to 
> execute in an if statement.  What are do the rest of you use?
> 
> 
> 
> On Sat, Feb 20, 2010 at 1:45 PM, Sanford Whiteman 
> <[email protected]> wrote:
> > Is it just a matter of personal preference or does it provide a speed
> > performance or is there other reasons?
> 
> · Personal preference
> 
> · Team coding standards
> 
> ·  Less  distraction  by  style  (less  to think about while typing if
> single- and multi-statement have the same style)
> 
> · Fewer screwups when adding additional statements
> 
> · Line breaks less sensitive
> 
> -- Sandy
> 
> 

Reply via email to