DEV Community


Discussion on: Who Killed The Tab?

bytebodger profile image
Adam Nathaniel Davis Author

I try not to get too much into the empirical arguments - because they tend to become circular, based on your own preferences. But when I do allow myself to go down the rabbit hole of actually quantifying why anyone would use tabs or spaces, I can't help but point out that:

  1. According to Merriam-Webster, a "tab" is a key on a keyboard that indents text by a preset amount. In other words, the tab characters (which are created with the TAB key) do exactly what is called for when we say that you should indent your code.

  2. Everyone I know who hates tabs, still uses the TAB key... to insert spaces (indentation) in their code.

But such "logical" arguments get lost in a lot of passion and vitriol. Devs just don't seem to be able to talk rationally about it.

nomade55 profile image
Lucas G. Terracino • Edited

Very fair points.

I think it's not only a matter of passion, it comes down to changing habits and codebases.

The ball is already rolling for many javascript projects. At one point, people who might accept for a moment the idea of using tab, go back to work where all the files are indentend with two spaces, and the amount of work required to change that is not worth it.