5

people who write code like this actually give me heart palpitations. No it is not cleaner, you literally broke the block, it's disgusting.

if(statement)
{
doSomething();
}

Comments
  • 0
    whats the alternative?
  • 0
    @rookiemaverick
    if (statement)
    {
    doSomething ();
    }

    ?

    I think their complaining about coding styles and specifically indentation.
  • 3
    if(statement){
    doSomething();
    }

    I do that. Is it correct?
  • 0
    so pretty much you guys are talking abt code formatting. I use select all and ctrl f to do that.
  • 0
    Slightly irrational over-reaction there. It's code style and it's utterly, totally, 100% opinion. Based on how you learned, what languages you use and what your group/team/company already has as their style guide.
  • 0
    @samk exactly, like I love lot's of white space in mine, other people don't.
  • 0
    just remove the { } since it's 1 instruction and it will be even cleaner.
    If(cond)
    dosh17();
  • 1
    @Venom Technically valid but so, so risky. I've never worked anywhere which allowed this style and I strongly advocate avoiding it. Make your natural instinct be to include the braces - reduces potential future bugs and IMHO improves readability.
Add Comment