upvote
One of the main arguments for tabs over spaces was always that people wanted to configure how much space a level of indentation makes up on screen.

With tabs pretty much every editor except something like notepad.exe could do it since ancient times, with spaces the editor needs to do a bit more processing, so you were a bit more restricted in editor choice, if you really were bothered so much by the indents chosen in the project.

So it is actually quite similar to the ligature discussion. It would be good if the code looked the same for everybody but now instead of saying "But 8-space indents waste so much space on the screen :(" some people now go "But I don't like seeing things like != or -> instead of modern Unicode symbols :("

reply
Spaces vs. tabs causes a lot of issues for Python programmers who share their code with other programmers. The other place where spaces vs. tabs is an issue is with makefiles, probably one of the most annoying features of POSIX.
reply
I also remember old school bourne shell wanting tabs in some places (case statements?), but bash doesn't have that issue.

These days, I try avoid them outside of makefiles.

reply
Considering the way `/bin/sh` had a bunch of different implementations before POSIX standardization minimized that in the mid-1990s, I wouldn’t be surprised if one of those distinguished spaces from tabs.

That said, the original UNIX V7 implementation of /bin/sh didn’t distinguish different kinds of whitespace:

https://www.in-ulm.de/~mascheck/bourne/v7/

reply
Well, the tabs vs spaces had been mostly resolved and spaces won. But obviously it was never about what physical keys to press, nobody on the spaces side would spam the space bar to indent stuff (except maybe in the unfortunate situations of having to use an editor with no choice of setting the tabulator to emit spaces, or a textfield in a non-editor UI where the tabulator cycles the focus instead).
reply
I'm still in the "tabs for indentation, spaces for alignment" camp. If you adhere to it, it makes your code look nice on any tab size.
reply
[dead]
reply
Typing formulas in Excel

It's too bad spaces won, tabs is just correct I think, since one can configure the tabstop to use any indent size they would like. I'm quite tired of reading 2-space indent. Seems everything has moved this way now except python. I'm even seeing C with it, which is especially jarring. I think the languages that use braces for indentation particularly need 4. Python needs it least, and I can read Ruby because its blocks are delimited by words and it's bad style to write long methods

reply
deleted
reply
Agreed, four is optimal and has luckily been the standard in projects I’ve worked in. Encourages you to avoid deep nesting as well.
reply
I'm in the same boat, I always just press tab and let my IDE or text editor fill in with N spaces.

Granted, I'm also someone who heavily encourages the use of Black as the Python formatter in projects I'm on, specifically because it has no configurable options - can't have a holy war about formats if nothing can be changed.

reply
> "understand the debate between spaces vs tabs"

The reason spaces won is that it's not (spaces) vs (tabs), it's (spaces) vs (tabs AND spaces).

reply
Oh, for Pete’s sake. The bodies from this holy war are barely cool…
reply