Just accept the other people have different preferences, and tabs and soft word-wrapping enables them to use their preference. If you don't then you're being selfish really.
Just accept the other people have different preferences, and tabs and soft word-wrapping enables them to use their preference. If you don't then you're being selfish really.
I completely agree with the soft wrapping of emails though.
Unfortunately, the world is full of people who don't understand this, so when tabs are used, they are used incorrectly (for alignment). Therefore, the one truerest way is (unfortunately) spaces for both indentation and for alignment. I've come to accept this non-ideal solution as a consequence of the wonderful but imperfect nature of Humanity.
That method is broken unless we also agree on a tab width, in which case we may as well use spaces anyway.
[2] http://i5.minus.com/iu14dVi9QRTri.png [3] http://i4.minus.com/itno9LlgJobQD.png
function declaration (most people would accidentally use too many tabs here):
public void severalParameters(String one, int two, String three,
StringObject four, AnotherObject five) {
...
}
assignments: String text = "text";
int a = -1;
History.Entry entry = new History.Entry(text);
Ultimately the problem with mixing spaces and tabs in one document is that programmers are human. Someone will inevitably make a change to the lines you've carefully indented and mess up the whitespace, and someone else will have to go back to fix it in a dummy commit. Having a simple rule that's easy to follow eliminates that source of wasted effort. public void severalParameters(String one, int two, String three,
StringObject four, AnotherObject five) {
// No problems here. It's just like my example.
// We're two levels of indentation in for these comments.
// The argument list continuation was at 1-level indentation with spaces for alignment
}
For these assignments, anything to the left is a semantic indentation (tabs), the rest is all alignment (spaces). String text = "text";
int a = -1;
History.Entry entry = new History.Entry(text);As with any coding standard, the point of the rule is to eliminate such sources of lost productivity.
Don't do that. It looks ugly on my tab-indented, proportional font display.
I personally hate aligned assignments. I find it very sloppy. But yes, that is what you would do if you so wanted aligned assignments.
Using only tabs, you cannot do aligned assignments unless you are able to set specific tab stops per line. If you disagree, I can provide an assignment example that breaks tabs. While per-line tab stops might be possible, the overhead of maintaining tab stops vs not using aligned assignments is not worth it.