Click here to Skip to main content
15,175,057 members

Survey Results

Braces around single line commands. Needed or not?

Survey period: 12 Feb 2018 to 19 Feb 2018

It's just about the braces. Not about whether the leading brace should or should not be on the same line as the conditional. One war at a time.

OptionVotes% 
I prefer

if (condition)
  statement;
21323.20
I prefer

if (condition)
{
  statement;
}
54158.93
It depends16417.86



 
GeneralBraces. Pin
Ron Anders12-Feb-18 4:04
MemberRon Anders12-Feb-18 4:04 
GeneralRe: Braces. Pin
Chris Maunder12-Feb-18 10:37
cofounderChris Maunder12-Feb-18 10:37 
GeneralAlways use curly braces Pin
ZurdoDev12-Feb-18 3:14
professionalZurdoDev12-Feb-18 3:14 
GeneralI prefer... Pin
Slacker00712-Feb-18 2:32
professionalSlacker00712-Feb-18 2:32 
GeneralRe: I prefer... Pin
ZurdoDev12-Feb-18 3:10
professionalZurdoDev12-Feb-18 3:10 
GeneralRe: I prefer... Pin
Slacker00712-Feb-18 3:12
professionalSlacker00712-Feb-18 3:12 
GeneralRe: I prefer... Pin
W Balboos, GHB12-Feb-18 3:52
mveW Balboos, GHB12-Feb-18 3:52 
GeneralThe usual b&tching PinPopular
W Balboos, GHB12-Feb-18 1:23
mveW Balboos, GHB12-Feb-18 1:23 
"It Depends" - what about "other" or "neither" ?

I prefer
C++
if (condition) {
  statement;
}


The opening 'curly bracket' at end of statement and closing 'curly bracket' aligned with the beginning of the statement.

Why Oh Why, Mr. Survey-Taker, do you so often skip the obvious? Reminds me of how political surveys are taken, designed to get the answer they want instead of the actual answer.

Ravings en masse^
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

GeneralRe: The usual b&tching Pin
Slacker00712-Feb-18 2:25
professionalSlacker00712-Feb-18 2:25 
GeneralRe: The usual b&tching Pin
gardnerp12-Feb-18 2:55
Membergardnerp12-Feb-18 2:55 
GeneralRe: The usual b&tching Pin
ZurdoDev12-Feb-18 3:11
professionalZurdoDev12-Feb-18 3:11 
GeneralRe: The usual b&tching Pin
W Balboos, GHB12-Feb-18 3:13
mveW Balboos, GHB12-Feb-18 3:13 
GeneralRe: The usual b&tching Pin
ZurdoDev12-Feb-18 3:16
professionalZurdoDev12-Feb-18 3:16 
GeneralRe: The usual b&tching Pin
W Balboos, GHB12-Feb-18 3:21
mveW Balboos, GHB12-Feb-18 3:21 
GeneralRe: The usual b&tching Pin
ZurdoDev12-Feb-18 3:31
professionalZurdoDev12-Feb-18 3:31 
GeneralRe: The usual b&tching Pin
W Balboos, GHB12-Feb-18 3:32
mveW Balboos, GHB12-Feb-18 3:32 
GeneralRe: The usual b&tching Pin
CodeWraith12-Feb-18 3:43
MemberCodeWraith12-Feb-18 3:43 
GeneralRe: The usual b&tching Pin
W Balboos, GHB12-Feb-18 3:44
mveW Balboos, GHB12-Feb-18 3:44 
GeneralRe: The usual b&tching Pin
Chris Maunder12-Feb-18 10:39
cofounderChris Maunder12-Feb-18 10:39 
GeneralRe: The usual b&tching Pin
bryce12-Feb-18 18:59
Memberbryce12-Feb-18 18:59 
GeneralRe: The usual b&tching Pin
W Balboos, GHB13-Feb-18 1:26
mveW Balboos, GHB13-Feb-18 1:26 
GeneralTo be extra confusing... Pin
Graham Breach11-Feb-18 23:55
MemberGraham Breach11-Feb-18 23:55 
GeneralAlternative 3 Pin
Jonas Hammarberg11-Feb-18 22:44
professionalJonas Hammarberg11-Feb-18 22:44 
PraiseRe: Alternative 3 Pin
CPallini14-Feb-18 8:40
mveCPallini14-Feb-18 8:40 
GeneralOK, so I'm a pedant, but really... Pin
A_Griffin11-Feb-18 22:21
MemberA_Griffin11-Feb-18 22:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.