Code Indentation: Tabs vs. Spaces

One of the discussions that inevitably pop up from time is the spaces versus tabs discussion, for indentation of code. Should you use tabs or three, four or five spaces to indent your code?

The people who use spaces usually give as their reason that your code looks the same in every editor, on every PC. That’s great, but is that an advantage at all? Those same people also have lengthy discussions, after they decided to use spaces for indentation, about how many spaces to use. “Shall we use just 1? I think that’s enough.” “Nah! Are you crazy!? Three is good.” “No, four!”

Wouldn’t it be great to have some kind of magic kind of space whose width was specifyable, so that everybody can use the width they prefer? Hmm, oh wait, that’s a tab!

All editors I know, allow you to set the width of a tab; do you think 1 spacing is enough, or do you prefer 8? Just set it in your editor.

People prefering spaces make no sense. Weird thing, though, is that I use spaces myself too. But that’s just because I’m too lazy to figure out to turn off the turn-tabs-into-spaces option in vim. And to set the tab-width to 3 (three rules!).