News for hackers. Stuff that matters.
Re:A Regular Expression Matcher (2007) by gfody on Monday August 01, 2016 @12:00AM (#12200126)
I keep one-line blocks unbraced when possible and my reasoning is definitely not to feel like a tough macho man. It's more like a mild form of OCD where any syntax that's not necessary just bothers me if I don't omit it.
Re:A Regular Expression Matcher (2007) by jake-low on Monday August 01, 2016 @12:16AM (#12200166)
Reductio ad absurdum: I assume your variable names are single-letter, your Python is indented only one space per block level and every C program is a one-liner? You should check out the Code Golf stackexchange; you'd do well.

Kidding aside, I can appreciate your feeling of OCD (I fight that urge too) but remember that most syntax is for humans, not machines. Using braces communicates intent to the reader; omitting them offers an opportunity to stumble.

Re:A Regular Expression Matcher (2007) by eru on Monday August 01, 2016 @07:29AM (#12201575)
Nah, humans go by indentation anyway. Just use whatever brace style you like, but make sure you have a linter / formatter that makes sure your indentation agrees with your braces.
Re:A Regular Expression Matcher (2007) by gmac on Monday August 01, 2016 @04:13AM (#12200856)
I'm with you on that.

The one line version isn't prone to goto fail, and to me reads very nicely.

    if (x == 1) return;
The two line version, however, I avoid like the plague.

    if (x == 1)
        return;