Let us set the record straight: which one are you? foo() or bar() and why?
@nixCraft definitely foo(), It just comes across as so much cleaner to me

@nixCraft oof.

Depends on the language and standards of the rest of the code base for me…

I usually prefer 1, but 2 is sometimes a bit easier to read.

Colored brackets in the IDE are great though, makes is so easy to see what’s paired to what.

@nixCraft I would prefer `foo()` since it usually leads to stuff like "bar" or "foobar".
@nixCraft foo, but adding a space after the params list
func foo() {
}
@nixCraft I am team stick to the coding conventions of whatever language I am using atm
@nixCraft it depends on language, and how incorrectly I'm remembering the style guidelines.
@nixCraft
bar() .... it's just clearer to me.

@nixCraft
Depends on the language each one has its own coding style, some allows you to do what you want, others like Go will give you an error if you dont put the brackets where 'it belongs'

I only care that the style is consistent in all the project

@nixCraft

`foo() {` definitely. Seeing just a random '{' on a line by itself seems off for some reason.

When more arguments are needed for the acceptable line width,

`foo(
...
) {`

@nixCraft doesn’t really matter to me. I usually write foo but if the editor I am using switches it I am fine. Or, if I’m working for or with someone that prefers one or the other I am fine. So many more important things to use your brain cycles on.
@nixCraft Whichever the style guide recommends, otherwise I'll use the general consensus for the language. That is, for C and Perl I use method 1, but C++ and Java I use method 2.
@nixCraft I've always preferred waldo. It's fun to play "where's waldo" with a codebase you haven't touched in a couple of months. 😅

@nixCraft

foo() 80%
bar() 18%
doo() 2% (for those💡moments)

@nixCraft bar, I prefer when the symmetric way of having { and } aligned. And that’s why I don’t really like Go that force you to have { at the end of the line

@nixCraft neither, it should be

void foo() {
// code here
}

@nixCraft /* comments */ for code, but
// for annotations.

@nixCraft I'm baz( ) 😉 which means foo( ) but my closing bracket has same indentation as opening bracket.

Everything else is wrong .

@nixCraft in C,

void
bar()
{
}

Function name is always bound to the beginning of the line, braces always align.

@nixCraft I tend to go with the coding standards of the framework I work in. Which is usually inline. However. I have a strict aversion to the whole foo bar thing. Utterly meaningless.

@nixCraft Method 1.
void foo() {
/* code */
}

Because a professor in college once told me that method 2 is used in college textbooks as a way to make the book longer and therefore more expensive. And that stuck with me.

But if we're being COMPLETELY honest....
def foo():
pass

@nixCraft foo; why waste another line?
@nixCraft Team bar. At least they have drinks.
@nixCraft foo is java, bar is c#
@nixCraft I like Foo Fighters, not bar fighters.
@nixCraft I used to be bar() until someone inserted a statement between head and body, thus drastically changing the code. now I prefer to foo()
@nixCraft Definitely 1, but with a space between () and {