Coffeehouse Post

Single Post Permalink

View Thread: curly bracket placement thread
  • User profile image
    Karthik

    I'm a same column fan, but with spacing.

    I personally would prefer -

    for (;Wink
        {
              //foo
        }

    And even if it is a single line, its quite disconcerting when people use -

    if (foo)
        { //bar }
    else if (foo)
        {
        //bar1
        //bar2
        }

    That is so wrong - if I ever saw someone do that, I'd personally go down and smack them. I think consistency in coding is a good thing.