From coding in C and C++ in the past, I like the security having the braces bring but I also like the brevity of not having to use them. I've kind of ended up in the use brackets camp because, in the long run, it makes the code easier to read for more people.
if (someRatherLongBooleanCheck)
doSomething()
if (someOtherRatherLongBooleanCheck)
doSomethingElse()
doNotLookAtMe()
if (imJustHereToDistractYou)
andWeAreDone()
I've been kind of back and forth on this.
From coding in C and C++ in the past, I like the security having the braces bring but I also like the brevity of not having to use them. I've kind of ended up in the use brackets camp because, in the long run, it makes the code easier to read for more people.
Hmm, what type of security do they provide to you? I’m interested now :)
See Paritosh' comment in this thread.
In short:
Or for a concrete example, the "goto fail" bug from a couple of years ago:
imperialviolet.org/2014/02/22/appl...