I care to agree with Linus. Tabs are a problem. Some languages literally forbid the use of tabs because of it. I'd like a strict definition of how large a tab is.
Alas, chrisname, I could actually read your penultimate post because you left it with correct grammar and things like articles and prepositions. (Otherwise it would have been indistinguisable to me.)
Torvaldes is wrong about tabs. Tabs have always been redefinable to meet your requirement, and the problem is exactly that people always redefine them to something other than equivalent to eight spaces. I always strip them first thing.
That's objective. Now for the subjective: I disagree with Torvaldes about indents as well. But, whatever.
I still use my old Delphi 5 IDE to edit everything, and I use the WordStar keyset. Does everything nicely. (Well, nearly everything.) The IDE is also smart enough to handle indents and outdents very easily. (This is all until I finish writing my own editor, someday, which will have my improved WordStar keyset and some more smarts about stuff.)
My code's tabulation is *always* 4 spaces wide - otherwise I would go insane. Sometimes when I need to, I will replace tabs with 4 spaces, but only when I have to, like when I program on my phone.
Alas, chrisname, I could actually read your penultimate post because you left it with correct grammar and things like articles and prepositions. (Otherwise it would have been indistinguisable to me.)
Damn, I guess I just can't butcher the English language that much...
Duoas wrote:
Torvaldes is wrong about tabs. Tabs have always been redefinable to meet your requirement, and the problem is exactly that people always redefine them to something other than equivalent to eight spaces. I always strip them first thing.
I've checked, using 4 space tabs instead of 8 with my code actually doesn't throw it off all that much. Tabs are good if you don't use spaces as well, but I tend to mix them because I like to align things, and unfortunately most of the basic types don't lend themselves well to 8 space tabs. If I used 4 spaces it would work, so I might try that...
Firstly, I don't use an IDE (don't like them, not minimalist enough). Secondly, what I mean is I do things like this:
1 2 3 4 5
int main()
{
int foo = 0,
bar = 0;
}
which means I have to either use 4 or 2-spaced tabs (which look too small to me and don't work when there are an odd number of spaces) or mix tabs and spaces. The latter works better.
I have syntax highlighting, bracket matching, line highlighting/numbering, a margin at column 80 and automatic indentation, no autocomplete (I could enable it but I don't like it), I'm not that minimalist, but
Also that code looks weird to me. I'm probably going to stick to 8 space tabs and a few spaces to align stuff.
I realize that for the most part this conversation it tongue-and-cheek, but just in case someone reading this doesn't know there are code beautifiers that can quickly reformat someone else code to your particular favorite style.
I would suspect that anyone who is really annoyed by any tab or bracket style should probably consider changing editors or if they are using a good editor should probably consider learning how to use the one they have.
I personally have a real love for vim; while it is not an intuitive editor once you learn it, it is really pleasant to use.
I think it's a good idea to get used to other styles rather than using something like indent or AStyle (unless your project calls for a specific indent/brace/etc. style). When contributing to a project you will most probably have to adapt to another style, likely one you have never seen before. Being good at this will be a good asset.