Code formatting is usually a conversation I absolutly hate with a passion. The hours wasted usually because some senior programmer defines his status by telling people how to code. Code consistancy is highly highly overrated, I have never heard anybody ever say “oh man I wish STL capitalized types”, or “I wish OpenGL used undescores”. We are happy to use 10 different 3rd parties written in 10 different styles and nobody ever complains. However my stance of tab lengths has changed, because I can see a messurable benifit.
Most commercial code I’ve worked on has been two spaced tabs like below, some of that code had no limit on line length some had 80 char limit.
I tried out 8 space tabs because the Linux kernel does it and I thought it was mad. However I am converted. Not only is it so easy to read at a glance, if you are using a 80 char line limit, you have to refactor often, just to reclaim line length.
The result straight to the point code, in small functions. Woo
also because line length is valuable real-estate you tend to favour early returns.