in reply to No Hard Tabs in Code

I would say "use spaces or use tabs, but don't mix 'em!" As long as you are consistent, you are fine. It's when you sometimes use a tab and sometimes N spaces when you run into problems. Or rather someone else with different size of tabs runs into problems.

I prefer tabs for indenting code myself.

Jenda
Enoch was right!
Enjoy the last years of Rome.

Replies are listed 'Best First'.
Re^2: No Hard Tabs in Code
by eighty-one (Curate) on Jul 01, 2010 at 14:03 UTC

    I agree that consistency is important, but I think it's best that consistency extend to an entire team rather than being restricted to an individual coder.

    A problem arrises when working on a team without a set standard. While each individual might have their preference and stick to it, they're usually working on a file that has been through many hands, so you'll have a mix of tabs and spaces. And the space people could have 4 or 8 column tabs. So you wind up with code that's supposed to be on the same level of indentation prefixed with 4 spaces, 8 spaces, or a tab.

    I used to work at a place with defined coding standards - nothing passed review if it had the wrong bracket style, or if you had tabs instead of spaces, wrong variable naming format, etc. I thought it was rather draconian until I went to work for a place that had no standards whatsoever and saw what a mess things were. More that just aesthetic; it was diffictult to follow the code and figure things out when the indentation kept poping back in and out.

    That all being said, I'm a space guy who converted from tabs. For one, a space is a space no matter where you view it. I've got my editor configured to insert four spaces whenever I press tab.