Good coders indent their code, as it makes the whole mess a lot more readable.
There are two ways of doing this, one using tabs, and another using spaces.
Mostly this is down to personal preference, but leads to countless arguments when tabbers and spacers collaborate on a project. Leading to the production of style guides and dissatisfaction all round.
Personally, I'm very much in the tabs camp, because:
- They're the semantically correct character to use
- They remove ambiguity, i.e. one tab per indent ("Ok, so Fizzbuzz should use spaces, but how many?")
- They allow a developer agency within a consistent style - some devs prefer small indents, others with huge screens prefer bigger ones. Tabs let you render your own choice, but preserve a common style.
- You only hit one button
Most spacers I've met are so because this was the default in their IDE and they don't like change. Nobody has yet convinced me that spaces for indents is objectively superior to tabs, and my personal view is that they're the coding equivalent of hitting enter a bunch of times in word, when what you actually want is a page break.
But, understanding is important, and I'm prepared to be convinced. So, Spacers... why?
(yes.. I'm aware this is possibly not the most important issue of our age, but I'm genuinely interested...)