Tabs offer coders flexibility in how their code appears to them. Indentation can play a role in personal productivity. Tabs work well with proportionally spaced fonts.
Spaces encourage a lot bad code style where people line up symbols in random places on the line, which makes reading more difficult and can mess up version control.
Projects that use spaces inevitably make it harder for some coders to contribute to their project. And if they fall victim to the second point they make maintenance as a whole harder.
My big concern has always been what the Tabs Are Evil article calls "continuation lines". I think code like this (from that article) is ugly and hard to read.
int f(int x,
int y) {
return g(x,
y);
}
Instead, why not structure it like this?
int f(
int x,
int y
) {
return g(
x,
y
);
}
Isn't that much easier to read? With indentation levels you know exactly what everything is.
Yes, exactly. If you wish to align things just start them all on the next line.
The space approach is entirely annoying, not because they're spaces, but because all functions have different alignments.
int go( int f,
int y );
int somewhatLongerName( int f,
int y );
This sucks for readability, but also has a very real cost in maintenance and source control. If you wish to rename a function you have to modify the alignment of all the parameters again, this needless increases the patch size, thus wastes reviewer capacity.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Tabs are the correct choice. I've covered this in my article, Lingering Spaces and the Problems of Overformatting
The key points are:
Projects that use spaces inevitably make it harder for some coders to contribute to their project. And if they fall victim to the second point they make maintenance as a whole harder.
My big concern has always been what the Tabs Are Evil article calls "continuation lines". I think code like this (from that article) is ugly and hard to read.
Instead, why not structure it like this?
Isn't that much easier to read? With indentation levels you know exactly what everything is.
Yes, exactly. If you wish to align things just start them all on the next line.
The space approach is entirely annoying, not because they're spaces, but because all functions have different alignments.
This sucks for readability, but also has a very real cost in maintenance and source control. If you wish to rename a function you have to modify the alignment of all the parameters again, this needless increases the patch size, thus wastes reviewer capacity.