Indentation

Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.

Rationale: The whole idea behind indentation is to clearly define where a block of control starts and ends. Especially when you’ve been looking at your screen for 20 straight hours, you’ll find it a lot easier to see how the indentation works if you have large indentations.

Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.

In short, 8-char indents make things easier to read, and have the added benefit of warning you when you’re nesting your functions too deep. Heed that warning.

Attached: linus.faces22052.web_.jpg (1619x2024, 1.27M)

how fast will Linux go to shit without him bros

Aye aye sir.
*press space 4 times to indent*

I'm afraid it's going to die with him.

>The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.
So you can't have any other indented blocks inside an if block that's inside a class's function?

obviously not, linus said so

>using classes

Attached: 1523912814964.png (700x700, 16K)

>class

Attached: rob pike disappoint.jpg (500x335, 19K)

8 characters for tabs is a complete waste of screen space

>can't have an if statement within a for loop if it's in a method because Linus Techtips said so

>you can't understand sarcasm

16 characters master race nigger

Fuck off LTT shill, the channel has been shit for years.

8 space indents are retarded

does using bigger indentations make your source larger?

Attached: 9d5.png (680x680, 59K)

Nope. A tab is a single character, so it actually makes it smaller.

depends on the environment

are you baiting?

>are you baiting?
A tab literally is one character. If you use a shitty editor that converts them to tabs, that's your problem.

2 space masterrace

I have no understanding of style or format but I still distribute hundreds of lines of code that other people inevitably end up having to deal with. Just thought I'd get that off my chest.

A class wont exist in the kernel codebase because it's in c so not an issue

>The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.
Any object oriented language ever needs one indent for the function declaration within the class, one more for the code in the function. So you're limited to one more statement that causes an indent. Can't have a for loop with in an if or the other way around.

Retarded. 4 spaces master race, 2 for markup languages are okay too.

If you're using an OO language then you're screwed anyway and should fix your program

Holy shit, how did you figure that out?

>needs
Unless it's Python, no, it doesn't

Attached: 1525263698789.jpg (3304x2195, 2.44M)

Obviously definitions don't count in oo

That's great you autist, but OP is from the Linux Kernel Coding Style so objectshit like classes is right out.

What did he mean by this