Jon A. Cruz wrote:
Nathan Hurst wrote:
Jonathan Phillips wrote:
I say we lock-in our coding style standards over the next day or so. We have much to clean-up b4 a release date and some tasks are waiting for admin. decisions.
TABS
I say we lock-in at 4 spaces is a tab, and correct that in the files. GOOD?
What's wrong with 'a tab is a tab'? Then everyone can pick the size they like. (I currently prefer 8, but I'm liable to change :)
Because then when you add any extra spaces, like for lining up params, comments, etc. they don't work anymore.
That's not true. If you use tabs for indenting and whitespace for alignment then it works everywhere.
Most of the 'reasonable' projects I've worked with have settled on 'no tabs', and were the better for it.
Or you bashed them into using it. :)
he doesn't really give a good reaons for not using tabs, beyond "that's what I use".
http://www.python.org/peps/pep-0008.html (See "Tabs or Spaces?")
python is special because the interpreter assumes tabes are 8 spaces (that is, it folds tabs into spaces, and of course spaces are important in python). We're talking about C++ here.
http://paul.oniony.com/sections/information/tabsversusspaces.html
I'm arguing for what he calls "Hybrid Indentation".
However, it seems more full of personal 'gut reaction' than any empirical information. He makes no mentions of any studies like the objective ones done on code readability, and believes that 8 space tabs are the best indention (shown to be wrong).
I don't care about how long you choose your tab to be. That's why I like tabs are tabs :)
(Sorry I took so long on that, but that page at first sounded fairly reasonable. It took me a little re-reading to see all the problems, so I'd thought I'd point the need to look for them so we don't fall into them oursevles)
You haven't exactly enunciated the issues yourself :)
Oh, and for the record, I used to be a "tabs" person myself, but changed over time as I ran into problems with it (especially as I was platform hopping and environment hopping a lot). Then after the fact I found more details explaining why I hit those problems, and why that and also the indention I prefer (4 chars) is more optimal.
I don't care if you like 4 chars, with hybrid tabs I can choose the far more reasonable 5 tabs stops.
Anyway, I believe there are pros and cons with either approach. I see that more of the edge cases weigh in favor of tabs over spaces, but I think that they are small enough factors that a strong preference for the things that tabs give over a preference for the things that spaces give can tip the ballance. Just that we should be aware of the different issues, then make a decision.
Yep, well when you've finished working it out, give me an emacs style, indent region on all the files and and we can move on to more interesting issues, like why my patch doesn't work....
njh