Tabs vs Spaces

Alright fa/g/ots, time to see which one is superior.

Here's the poll: strawpoll.me/13144200

Other urls found in this thread:

kernel.org/doc/html/v4.10/process/coding-style.html
twitter.com/SFWRedditVideos

...

Tabs don't have to mean 4 spaces, you do know that right?
That's why they're superior. You can configure how many "spaces" a tab is.

tabs that make spaces

tabs to indent, spaces to align

>mixing tabs and spaces
This is why spaces are the only option.

Why is that bad? Just have your IDE replace any 4 spaces with tab, if you ever accidentally fuck up.

Proper tabs are equivalent to eight spaces you sack of shit.

Linux style is the only valid style.
kernel.org/doc/html/v4.10/process/coding-style.html

space master race

these guys know what's up

Question is bad. On a properly configured system, it simply shouldn't matter.

>Tabs don't have to mean 4 spaces, you do know that right?
And the reason this is wrong is exactly why. "Variable" tabs just break whenever you try to change the tab width. Consider the following hypothetical but properly aligned expression:
while((a || b) && ((c && d) ||
(e && f)) &&
(g || h))

Now change your 4-space-tabs to 8-spaces and watch the carnage:
while((a || b) && ((c && d) ||
(e && f)) &&
(g || h))

That's what would happen unless you very thoughtfully use tabs for "block indentation" and then spaces for "expression indentation" or whatever, and nobody (nobody in their right mind, one might add) does that.

That's still a relatively simple block of code, too. The more 2D layout you use, the more broken the retarded idea that tabs can be changed becomes. Tabs do one thing and one thing only: They advance the cursor to the next column ordinal divisible by 8.

emitface (a, b, d);
emitface (b, c, d);
if(backface) {
emitface(a, d, b);
emitface(b, d, c);
}

>Tabs do one thing and one thing only: They advance the cursor to the next column ordinal divisible by 8.
Notable is also that this is how tabs work everywhere except in stupid IDEs (and web browsers, probably not a coincidence), so when you use tabs incorrectly you mess up every other program trying to display your files.

>intro CS class
>university style dictates three spaces (God only knows why; likely to flush out what comes next)
>there are a majority of people that slap the space bar three times for indentation
>if they've got multiple levels, they space six, nine, or more times
>thought it was just retard freshman
>later had a class where the teacher, who had worked as a programmer, used the spacebar for indentation

all of you are retarded;

heres why tabs > spaces


tab tab tab tab

vs


space space space space space space space space space space space space space space space space

geee i wonder which one is more efficient

>being this stupid
No one but the cuckest of cucks uses the spacebar for indentation. The question is what the tab button does.

lmao strawpoll doesn't fucking work
i literally got a fucking raw json file when I tried to vote

This, but I'm curious what people of other editors do, more precisely. In Emacs, the Tab key simply autoindents. While it's not my primary editor, I know that Tab in vi always inserts Tab characters, and that ^T is used for soft-tabbing. What does Your editor of choice do?

I set the tab key and auto indentation rules to follow whatever the project standards are. If the code base wants 3 spaces, my tab key puts out three spaces. If it wants tab characters, it does tab characters. It also does the correct indentation whenever I go to a new line after I start a for/if/whatever block. It takes a single variable assignment to do this. Any reasonable editor should be able to do this. I use Vim.

2 spaces. Like all the competent developers around the world.

Tabs can break the fuck out of SQL though.

Spaces because different systems can show the tab "character" differently than what you had originally intended. A space is always a space.

^ this unironically.
Also, why is this not an option in the poll?

Guess what kind of dev made the poll.

S P A C E S
P
A
C
E
S

This is why you use tabs to indent and then use spaces to align things.
It's common sense.
But yeah, as you said, barely anyone does it from what I've seen.

The worst part is most IDEs are fucking terrible at working with Tabs.
Also, having a ruler to change the tab indent dynamically would be very handy, rather than having to go in to options. (even just a menu option would be good!)

Project style guide > language style guide > your opinion

Tabs (8-aligned) if the language is good at avoiding nesting (C and Go, dunno about any other), 4 spaces for majority of langs, 2 spaces for HTML

and then every other editor you encounter has it configured the way you don't want.

Tabs to indent, spaces to align.

eeeeeeeeeeeeew
wtf
kys

>TABlets detected im this thread.

>align
Disgusting.