WizardStan
Mega GP Mania
- Joined
- May 24, 2008
- Messages
- 16,733
Tabs are meant for indenting, spaces for alignment. You're allowed to mix them in that case.that is so if thing are lined up (be it in comment diagrams, variable assignments, or whatever).
/t/tfunction(variable,
/t/t variable,
/t/t variable)And it'll always line up regardless of what tab spacing you use. If you like indents to be 4 characters it'll work. If you're from a culture that hates the number 4 and all indents are to be 3 you're good. Anyone can look at your code and be comfortable with the tab alignment.The instant one person replaces a tab with a fixed number of spaces, however, or a fixed number of spaces with a tab, the whole thing gets shot and you are now forced to use that tab width.
The code I'm currently working with consists of a library that used 4 spaces to indent and replaced 8 spaces with a tab and one that uses 3 spaces to indent replacing 4 spaces with a tab. It is a headache to quickly look from one file to another.
Tabs are for indenting, spaces are for alignment. This is the only way to make everyone happy.