You guys will fight for anything

You guys will fight for anything

Attached: 1518824466989.png (586x357, 166K)

I like the top one because that's what Visual Studio does for me.

function ()

{
stuff ();
}

holy shit user, that's a lot of useless space

function(){stuff();}

The Best Way

Attached: Orange.jpg (1080x1062, 342K)

the non-brainlet answer is to follow whichever is the de facto convention for the language you are using

but to generate some actual discussion, blocks of code using allman style braces are vertically symmetric and clearly separate function signatures and conditions from the actual body, making the signature/condition and first line of the body not "bleed together" at a quick glance (unless you leave an ugly blank line)

if (getRandomValue() == 33 && getRandomValue() == 99) {
int stuff = 10; // looks like it belongs to the
int moreStuff = 30; // above line
}

if (getRandomValue() == 33 && getRandomValue() == 99)
{
int stuff = 10; // clearly its own group of
int moreStuff = 30; // statements
}

on the other hand, 1TBS is consistent with how you would split up function calls with many parameters

var myCar = carFactory.Create(
COLOR_RED,
"Cadillac",
new Engine("v8")
);

var myCar = carFactory.Create
(
COLOR_RED, // no sane person puts the opening
"Cadillac", // parenthesis on a newline
new Engine("v8")
);

if(you.formatCodeLikeThis())
{
kill(yourself);
}
else if(you.doThis()) kill(yourself, also);

>not using
ifelse(you.formatCodeLikeThis(),kill(yourself),ifelse(you.doThis(),kill(yourself, also),null));

pleb

Whatever the style checker demands of me.

The correct answer is Python.

Whatever the linter auto limits to lmao, I just write shit in one line and hit a shortcut

I thought I didn't care, but then I saw these posts and realized death camps are a justified response to this behavior.

>allman
>all man

Attached: famaleprogramme_0_o.jpg (1000x749, 455K)

>tfw no qt programmer gf

This, I prefer to read my methods like god-fearing english sentences thank you very much

fuck brackets and spaces

The real question is this:
std::vector returnVector( uint32_t* LongNameForParameter1,
double* LongNameForParameter2,
const float& LongNameForParameter3,
const std::map& LongNameForParameter4)
or this:
std::vector returnVector(
uint32_t* LongNameForParameter1,
double* LongNameForParameter2,
const float& LongNameForParameter3,
const std::map& LongNameForParameter4
)

if(getRandomValue() == 33
&& getRandomValue() == 99)
{

}

I prefer to see the bottom one better personally, but I don't really give a shit.

>be qt programmer girl
>get the braces right for functions
>mess them up for ifs
into the trash she goes

first one obviously
second one just looks ugly and doesn't make sense

wouldn't it do the bottom by default?

>uses applel
>game developer
>programmer
hmmmmmm

looks like this settles it

please commit sudoku at your earliest convenience

Attached: 1542755614056.jpg (191x62, 18K)

If you don't write code as the second style, it shows your lack of experience.

Go was literally enforcing it to make code easier to learn for beginners, because most novices don't know that whitespace is ignored in languages like C/C+, becuase they learned Python first.

But what about the other ones sitting in the background?

I choose the anime girl