That said, only a moron would use tabs to format their code.
- unless you happen to be programming in whitespace or Python.
The python style guide PEP 8 actually says to prefer 4 spaces per indentation level; however, the python code base doesn’t follow these rules very carefully.
I’ve worked at exactly one organization that had a style guide they stuck to religiously. Other places have style guides, but:
- No one actually reads them.
- No one takes the time to convert legacy code to the new style, even if it’s just a change in indenting that could be automated.
Personally, I did find that a uniform style guide made me more productive at the one place that used it. I didn’t agree with all elements of the guide, but when I could count on everything being in a specific format, I could read other people’s code much more easily. It also helped that comment formating was standardized and that function contracts were required.
I think that the real solution is that language designers come up with a style guide that just comes with the language and is used by all standard libraries. Java does this, and people are much more likely to follow the java style guide than they are to follow a coherent style in a language like C++ where there is no standard style.