Indent style

how do you quickly identify code that belongs in the same block when using K&R indentation?
it's such a bad choice for structuring code imo.

>>>/g/

So you never wrote any significant code and would rather have more browser threads, got it.

IMO its pretty easy to tell based off of the indents. Only think I would do is add braces for those if statements because I always forget to when adding more lines.

Tbh it doesn't really matter, just personal preference.

You look at the tab you faggot. The massive empty space.

Allman looks gay as fuck to my eyes and makes everything look cluttered.

K&R basically tries to mimmick a space only indentation like Python whereas Allman makes use of braces as visual delimiters.

I don't like the closing braces in K&R. They should be on the last line of the block. Kind of like lisp.

This has to be bait

You figured it out.

...

...

...

If I could go back in time and kill the whitespace fetishist that started that meme I would.

Why? It looks better with the whitespace.

...

while(x == y) { something(); somethingelse(); if(some_error) { do_correct(); } lastthing();}
God's formatting.

while(x == y) { something() ; somethingelse() ; if(some_error) { do_correct() } lastthing() }
Time Cube Formatting
t. wisest human and cubic

while(x == y) { something(); somethingelse(); if(some_error) { do_correct(); } else continue_as_usual(); }
It depends on the content. I only add white spaces where it makes sense. OP, your picture feels like the mobile-first design literally infested your code.

What a mess, i hope you never write code that others have to maintain

while(x == y) {something(); somethingelse();if(some_error) {do_correct();}lastthing();}

Literally just look at the indentation. It just werks.

Side note, and may just be the autismo, but I absolutely despise it when people don't use braces on their ifs, even when it's just one statement. It's messy and inconsistent.

Who cares about that? The real reason no-brace if statements are cancer is that they're error prone. Allowing such tripe is one of the many many things that show C to be the hacky garbage it is.

This is the patrician way

while(x == y){ if(!somthing()){ goto error; } if(!somethingelse()){ goto error; } continue; error: do_correct();}finalthing();

We could have stopped it..

There are lots of places where you have to avoid having unrelated symbols touch even >> had to have extra spacing in C++ until recently, so the ){ constructs just wind up looking out of place in larger chunks of code.

jesus christ just kys for such retardation

Reasons to use K&R:
You're writing a book and need to save paper
That's it.

If you really wanted to save paper/screen space you'd use

I actually like it except for having that if statement all on one line. If it were up to me I'd change it like so:

while(x == y) { something(); somethingelse(); if(some_error) { do_correct(); } else continue_as_usual(); }

you(){ are() { a() { } faggot() { } }}
There's no purpose to all that whitespace.

while(x ==y ) { something(); somethingelse(); if( some_error ) { do_correct();} else continue_as_usual(); };

And this make sense because it easily allows your eyes to see where things start and end. It's fucking common scientific knowledge that proper white spacing makes things easier to read.

BUT MUH K&R!!!!!!!!!!!!!!!

too much whitespace and inefficient semicolons

K, R, C, they all belong in the trash if you ask me. :^)

sort your shit you retard: C, K, R