|
For me, there is one single reason spaces are superior to tabs, and that reason is the most important: it ensures that you, the reader, are viewing my code exactly as I, the author, wrote it. Consider this snippet, where tabs (⇥) equal four spaces (·) in my editor: if (someCondition) {
⇥ Foo foo = SomeClass::SomeFunctionCall(myParameter1,
⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ··myParameter2,
⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ··myParameterN);
}
Looks good.Now you open this snippet in your IDE, where tabs are set to two spaces: if (someCondition) {
⇥ Foo foo = SomeClass::SomeFunctionCall(myParameter1,
⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ··myParameter2,
⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ⇥ ··myParameterN);
}
This matters more when the presentation is important, like I might write ASCII diagrams in my code, are have a large matrix with elements aligned, or similar. |