But spaces enforce the same presentation for everyone.
Yes, but tabs mean developers can choose their own level of indentation.
PEP-8 tells us to use spaces :)
1 Tab = 1 Byte. 4 Spaces = 4 Bytes.
If you want to start a heated debate where everyone has a differing opinion, just ask developers if they should use tabs or spaces. Then grab some popcorn and watch the insanity unfold.
The only guaranteed outcome of these arguments is an incredible amount of wasted time, and I can personally guarantee you that once the argument has died down, your repos will still be filled with a mixture of tabs and spaces. Meanwhile, architectural decisions on the best way to increase the performance of your transaction processing system while at the same time retaining compatibility with legacy clients has been put off for another day.
Endless discussions on the presentation of code is just one example of the many logic thiefs that the average developer will encounter during the day.
As a developer, nay, a human being, I have a very limited capacity to make rational decisions during the day. You can take the very literal view that people have “x seconds to make a decision / y seconds in the working day = z decisions / day”. Or you can look at some of the research into decision fatigue:
This sort of decision fatigue can make quarterbacks prone to dubious choices late in the game and C.F.O.’s prone to disastrous dalliances late in the evening. It routinely warps the judgment of everyone, executive and nonexecutive, rich and poor.
Every time I encounter a logic thief, I lose just a little bit more of my ability to make the kind of decisions that are actually important to my job. Tabs vs spaces, how detailed to make my daily reports, title case or not in a title, what tags to put on a wiki article; these are all examples of logic thieves that detract a surprising amount of energy from my day.
With just a little bit of effort, most of these decisions can be made automatically by a machine. Editorconfig can be used to apply basic code standards automatically. My calendar and git commits can be used to determine what took up my time today. Text can be converted to title case with relative ease using a few simple rules. Many high quality clustering and categorization algorithms have been developed and their implementations open sourced, allowing content to be tagged and grouped automatically.
And yet a surprising number of workplaces not only tolerate these logic thieves, but actually wear them as badges of honor. Ask any manager about their detailed style guide and they will humble brag for hours about how it has led to increased levels of consistency. Never mind the fact that that, without automation, this style guide reduces your highly paid and intelligent employees to the level of trained monkeys, while at the same time robbing them of the energy they need to make the decisions you actually pay them to make.
While these logic thieves may not seem like they are a big deal on their own, in the big picture they are robbing your enterprise of precious productivity while providing very little value in return.
So do yourself a favor and spend a few days spent automating away a logic thief, because it will pay itself back many times over in the years to come.