Why is Allman usually not the bracket/indent style of choice?

Why is Allman usually not the bracket/indent style of choice?

It makes more sense, helps visualize nested code and looks more symmetric.

Other urls found in this thread:

mirror.co.uk/news/uk-news/rotherham-child-abuse-gang-victims-7451450
twitter.com/NSFWRedditImage

Fuck off pajeet

because most people don't care to brag about loc.

K&R is the one true brace style you blasphemer.

Allman is better but javascript monkeys can't use it because

return
{
foo: bar,
}

does not work (I think the interpreter inserts a semicolon after the return statement)

Actually, one true bracket style is the one true brackrt style
All hail 1tbs

because it adds a shitton of unnecessary lines and stretches out the code, if I want to add a blank line for code readability I'll do it myself

in the old times they used shitty brackets because they needed to print out the code you dumbfuck but now we dont have to spare lines.OP is fucking right.i'd rather have a readable code than stroke my cock to "hahaha my spagetti code is only 20000 lines while yours is 230000 hahahahahahha".

Allman >>>>>> everything else

K&R style is harder to read

one day, you might join the forces of real programmers, and you will see how young and dumb you were

>Why is Allman usually not the bracket/indent style of choice?
But it is in the only language that matters nowadays, C#.

>tv licence

>tv detector vans
>search warrants
>licences are half price for the legally blind
holy shit

>x is better because most people prefer it

>admitting to being a shit programmer
Opinion discarded.

finally justice after 2 years
mirror.co.uk/news/uk-news/rotherham-child-abuse-gang-victims-7451450

this,
if (PAJEET){
pooInLoo();
}

still makes the block scope obvious

Because people are retarded that's why. They do not know how to press enter before and
>muh extra line

>Not using superior style
>Used by authoritative projects such as systemd

this may seem weird but i like keeping my braces like this

int dumbfunc(bool shit)
{
if (shit)
{ return 42; }
else
{ return 7; }
}

void Foo()
{
if (Butts) Something();
else Bar();
}

2bh

void Foo()
{
Butts ? Something() : Bar();
}

sure that too.

>it's actually real
No wonder pootterring is only capable of making the most ridiculously bad software known to man.

//function definition
int
main(int argc, char *argv[])
{
//if statement
if(expr) {
//code
//code
}

if(one_line)
//code

return 0;
}

THANK YOU.

Goto fail u fucking moron

>one line if with statement on a new line
Not a good idea

constructor(
private ButtService: Butts.IButtService
){
this.Butt = ButtService.GetButt();
}

Fuck off retard

>not using ternary operator

Seven line statement, which should take no more than one. Plebs everywhere.

>not all code paths return a value

const foo = a => pajeet&&(pooinloo()); !pajeet&&(bar())

nigga stop this evaluation abuse shit a ternary is better than this

I only ever use it when assigning to a variable.

(defun foo () (if pajeet-t (poo-in-loo) (bar)))

gotta be OOP
let foo = new Function('{true: Pajeet.pooInLoo(), false: Pajeet.bar}[new Boolean(Pajeet)]')

>not void poo()

Where is the function factory service???

But they do you fucking retard.

K&R with Egyptian brackets for Java and Javascript

Kernel style for C and C++

Anything else and you should seek intercourse.

>not writing all your code on a single line to make it more efficient

>youngsters are also asked whether they feel safe using single-sex toilets
That's why there are toilets for the disabled in pretty much every school. Why don't they just fucking use them.

I think we can at least all agree that kernel style is degenerate as fuck.

>tabs out to 8 characters
>nl brace for functions, everything else is K&R brace
>except single line conditionals, which are just one line

At least they got column width right, but jfc

one liner ifs should really be done if you are certain that they would never change, like maybe in some small math function. Otherwise you're just making more work every time you need to add extra statements for that if.

nl brace for functions IS K&R you goof. Also 8 character tabs is there to force people to write readable code. If there's too much nesting linus doesn't want it. It all works out because there's only one person who makes the decision if something passes or fails.

>single line if blocks should not be enclosed in {}

hahaha, oh wow

Doesn't linux kernel coding style mention exactly the same case and says you should like it's suggested in systemd only if you're trying to something very shady?

why is it harder to read, wasting a whole nother line for a brace makes the program itself harder to read because it will require more scrolling.

Is it bad that I purposefully write all my if, for and while loops in a single line so as to do everything without the use of brackets?

>brackets

ew

Superior Haskell master race here.

Because the name and the body of the function are seperated much more clearly. The name and the parameters are on one line and the body starts on the next line, not on the same line. Pic related

>more scrolling = harder to read
That's not what harder to read means. That just means that you have to scroll more (1 line, which is fucking nothing).

Allman only works for tiny programs. As soon as you start working on bigger projects than your everyday /dpt/ console program, the Allman style becomes unbearable.

>(1 line, which is fucking nothing)
also 1 line for every conditional

checkmate atheist

void function(int argument){
Logic();
}

I used to do this shit until I realized that wasting whitespace for no reason is fucking retarded

it's the same as lining up all function/method arguments on top of each other

don't do it you fucking cunt

It's harder to read than
void foo()
{
if (PAJEET)
{
pooInLoo();
}

else
{
bar();
}
}

*than
void foo() {
if (PAJEET) {
pooInLoo();
} else {
bar();
}
}