34

there are three kinds of programmers

foo () {
// those who use this
}

foo ()
{
// those who do this
}

for () { } // and theres this

Comments
  • 5
    I use White space.
  • 9
    I use both the first and the last one. The last one I unly use for setters and getters with just one statement.
  • 1
    2 for opening functions (if I'm coding C), because I did it like that before development was my job. 3 if it only contains something like return or continue. 1 for most other things.
  • 3
    classic C programmer, using as few characters/lines as possible
  • 1
    () => {}
  • 0
    First in Golang, Second in C, last one never.
  • 2
    This is the true nightmare...

    Foo()
    { // begin your code here
    }

    Some editors don't know how much to indent this shit
  • 0
    Where's the "bar"?
  • 3
    private void foo(

    )

    {

    }
  • 2
    And then there is Python
  • 0
    First one is the best one, php rulez
  • 1
    And there is also...

    foo () {
    bar();
    things();}
  • 0
    3rd one is for those sexy oneliners šŸ˜‰
  • 0
    That's why there'sā€‹ code convention šŸŽ¶
  • 0
    My IDE does the second one automatically
  • 0
    2 all the way.

    And sometimes 3 for one-liners like;

    void draw(sf::RenderWindow &window) { for(int i= 0; i <= numitems; I++) { window.draw(item[I]); } }

    I prob made a mistake in there, on my phone lol.

    EDIT:I did make a mistake, numitems is undefined.
Add Comment