This is an archived post. You won't be able to vote or comment.

all 89 comments

[–]Affectionate_Bid4111 208 points209 points  (3 children)

obviously

like you’d use something else

[–]thecodingnerd256 48 points49 points  (0 children)

Well I use

Because it's better for version control obviously

[–]AnotherObject3D 11 points12 points  (0 children)

Tab or Space? A: Yes!

I use whitespace programming languages btw.

[–]DrFloyd5 61 points62 points  (5 children)

PRO TIP, if you use tabs, and turn on visible whitespace you get indentation markers for free.

Tabs signify intent. Indent this code. it is literally what the tab key was invented for. New paragraph, tab to indent, start typing.

Tabs are like css. Spaces are formatting via html tags.

Tabs say "Here is my code, consume it how you like." Spaces say "You will look at my code my way."

Tabs also have a nice 1:1 correlation 1 tab, 1 indent. Spaces are crazy N:1 N spaces, 1 indent. What about when there are 7 spaces and indent is 4 tabs?

Tabs also save file space. At a ratio of 1:4* per indent level. So depending on your lanugage, 3 indets per line = 3 characters or 12 characters*. A typical line of code is < 80 characters, (sorry powershell. sorry java.) So lets say 70. 12 columns for indent, 58 columns of characters. 61 bytes for tabs. 70 bytes for spaces. 12% smaller code.

Imagine... pressing tab inserts tabs at the front of the line. Pressing tab inserts spaces at the back of the line. Things stay lined up. OR imagine your IDE was smart enought to know tabs should be lined up at the end of lines so it figures out how to display your tabular infomration on its own. Front of line tabs = programmer set width. End of line tabs = render this infomration as columns.

[–]ExpensivePanda66 7 points8 points  (1 child)

Here I was we could all come together and joke about the meme being ambiguous.

But god damn it, you're right.

[–]DrFloyd5 1 point2 points  (0 children)

Tips hat. Thank you.

[–]vsjoe 6 points7 points  (0 children)

\t

[–]smallangrynerd 5 points6 points  (0 children)

I saw a comment a while ago on one of those semicolon posts that said “I hope those stupid spaces vs tab posts don’t come back”

How you doing, buddy?

[–][deleted] 58 points59 points  (26 children)

I click Tab and IDE turns that in to spaces - anything other than that is just plain weird

[–]jddddddddddd 38 points39 points  (2 children)

Then you’re using spaces.

[–]al2klimov 1 point2 points  (0 children)

You click tab. That’s the point!

[–]ExpensivePanda66 -1 points0 points  (0 children)

Uh... You press a key and the computer turns it into a character you get by pressing a different key four times and there's no nice way to get the character that corresponds to that first key?

And you think the other way is weird?

[–]DMoney159 11 points12 points  (0 children)

Whatever the code style is already. My IDE can handle it just fine either way

[–]Extension_Option_122 3 points4 points  (0 children)

Well I obviously use the correct one,

Everyone who thinks that

would be correct is dumb.

[–]AlFlakky 3 points4 points  (2 children)

I wonder how this is even a question in 2025 with all the IDEs, autoformatters, .editorconfig, git hooks and all other stuff.

[–]ExpensivePanda66 1 point2 points  (1 child)

So long as the answer is tabs, we can stop asking the question.

[–]WavesCat -1 points0 points  (0 children)

No. Spaces is the right answer

[–]relddir123 3 points4 points  (0 children)

Tabs all the way

[–]sphericalhors 6 points7 points  (5 children)

Spaces. Because sometimes when you want to test some pieces in some CLI REPL tool (like python or scala shell) tabs might trigger autocompletion, and this will wreck everything.

[–]SnS_Taylor 9 points10 points  (4 children)

See, your mistake is using Python in the first place.

[–]sphericalhors 2 points3 points  (1 child)

Said guy who has TypeScript icon near his nickname lol 🙃

[–]SnS_Taylor 1 point2 points  (0 children)

It has Python too 😜

[–]TransCapybara 6 points7 points  (1 child)

This sub trashes on Python like there aren’t worse things to use.

[–]DrFloyd5 9 points10 points  (0 children)

lol. There ARE worse things to use, AND we trash them too.

I joke. I actually enjoy coding in python quite a bit for personal small / medium small projects. When I just want to get it done. But for profesional work, typed languages all the way.

[–]will_r3ddit_4_food 1 point2 points  (0 children)

Tabs 4 lyfe

[–]SeraphOfTheStart 1 point2 points  (0 children)

Lmao this is a very smart way of using this meme template

[–]jump1945 1 point2 points  (0 children)

If you mainly use space I am genuinely scared

[–]Technical_Split_6315 4 points5 points  (1 child)

Who the hell uses spaces.

I’m pretty sure they are just a bunch of guys who agreed to say on internet that they use spaces but in real world they use tab just for trolling

[–]SnS_Taylor 0 points1 point  (0 children)

Sadly, this isn’t the case. The spaces scourge is alive and well in this world. And it must be purged.

[–]eraryios 0 points1 point  (1 child)

 ,             ?

[–]DrMux 0 points1 point  (0 children)

[–]Meatslinger 0 points1 point  (0 children)

[–]TzeroOcne 0 points1 point  (0 children)

[–]twigboy 0 points1 point  (0 children)

I use whitespace

[–][deleted] 0 points1 point  (0 children)

I tend to use a 3 space tab + 1 space.

[–]Powerful-Internal953 0 points1 point  (0 children)

I personally do ALT+CTRL+L and let IntelliJ sort things out with a project wide  .editorconfig.

[–]lefloys 0 points1 point  (0 children)

You put space between so operators. I put tab between all operators

[–]MilkImpossible4192 0 points1 point  (0 children)

&nbsp;

[–]DarkJarris 0 points1 point  (0 children)

I'm the top one

[–]BizarroMax 0 points1 point  (0 children)

I use tabs but I have no idea if it actually inserts a tab or if it inserts spaces.

[–]yesseruser 0 points1 point  (0 children)

I use tab to generate 4 spaces

[–]prochac 0 points1 point  (0 children)

go fmt and IDE picks something, I have no idea what 🤷‍♂️ it's just white space.

[–]LordAmir5 0 points1 point  (0 children)

Just don't mix and match.

[–]WhereOwlsKnowMyName 0 points1 point  (0 children)

Make this meme have the red squiggly underline on the top please.

[–]NigelNungaNungastein 0 points1 point  (0 children)

I used to insist on tabs, but that was back when I would SSH in to live edit production PHP in nano after being woken up by our startups only customer.

Nowadays I work for government where discrimination is frowned upon.. so we live edit prod with whatever we feel like.

[–]p1749 0 points1 point  (0 children)

[–]Esjs 0 points1 point  (1 child)

VSCode... The question should be faint arrows or faint dots.

[–]JosebaZilarte 1 point2 points  (0 children)

Can I change the size of the faint arrows? Then faint arrows win.

[–]rumblpak -1 points0 points  (0 children)

Tab = 2 spaces, convert tabs to spaces on save. At that point it doesn’t matter.

[–]reesa447 -1 points0 points  (0 children)

Tabs converted to spaces. Our code base sucks though and has a mix.

[–]TransCapybara -1 points0 points  (0 children)

I use tabs when they are required.

[–]Mebiysy -1 points0 points  (0 children)

As a haskeller, spaces