I've never understood what are real good reasons to use spaces if it isn't existing code or there's a style guide recommending it.
Nor why style guides recommend it.
Any one have a good reason?
Nor why style guides recommend it.
Any one have a good reason?
void function_with_lots_of_arguments (int arg_a,
int arg_b,
int arg_c);
If I was to use tabs and someone had a different tab width to me, they might end up with: void function_with_lots_of_arguments (int arg_a,
int arg_b,
int arg_c); class Foo
{
\tint bar(int a,
\t int b);
};\t int b);
or
\t\t int b);
Because they'll look the same to you, but not to anyone else without 4-space-tabs.
If I type with 4-space tabs:
username admin
port 22
importance 3
And then print it with 8-space tabs: username admin
port 22
importance 3
but if I had saved the tabs as spaces, it would still line up.You can use spaces only, or you can have a random invisible mish-mash of tabs and spaces.
Nobody EVER gets it right, and if you're coding in something whitespace-sensitive, you're in for a wild ride.