This argument came up again for me recently at the company I work for (Snowblind Studios). I had been told to stop inserting spaces where tab characters belonged, and an all-to-common scene ensued wherein I espoused the tabs-are-evil mantra but had little memory of why that mantra was with me.
So I did a bit of research to put the matter to bed once and for all. Or, so I thought. Hah! What a joke. This is a religious issue if ever there was one. Want to see just how religious this argument is? Just check this out:
A good clinical overview of this tabs vs. spaces can be found at this URL:
Tabs in programmingIn computer programming, the use of tabs for code formatting and indentation is an ongoing debate. Programmers are generally divided into two camps - those who use hard tabs in their code, and those who configure their editors to insert actual space characters when they press the tab key. When tabs are replaced to spaces in this way they are referred to as soft tabs.
There are many arguments for and against using hard tabs in code. What can be said without doubt is that one early benefit of tabs, i.e. compression (see above), is now less relevant as storage is so cheap, and sophisticated compression algorithms can provide much greater benefits.
Other argument summaries:
And yet more from the why_no_tabs page:
- Possibly the best pro-tabs page I've seen so far. I agree with most of what he says, except the bit about diffs looking fine. He also forgot to consider quoting code in e-mail.
- Indentation/Tabs/Space Policy in a C++ coding standard
- Style guide for Python code
- FreeBSD style guide
- How To Write Unmaintainable Code
- Coding standards for the Jakarta Project
Someone who didn't give his name sent me a whole bunch of related links. I'm relieved to see that these pages mostly agree with me :-)