If an
IDE converts Tab into space, I can set Tab to 4 space and it should be fine because the line indentation will always be four spaces, and instead of typing 4 spaces, I can just hit Tab instead.
Now if the IDE does not convert Tab into space, now comes the question of one Tab is set to 8 space. On the first line indentation, I will type 4 spaces; on the second, I can use a Tab (because typing 8 spaces is boring), and the thrid line, I can use a Tab and then type 4 more spaces (because typing 12 spaces is even more boring). Is this how I suppose to understand the Tab issue in coding convention?
Why did not Sun decide to set Tab into 4 spaces? This is what I still do not understand: why setting Tab to 8 spaces is better than 4 spaces. I think the opposite is ture. With one Tab set to 4 spaces, we can just use Tabs instead of typing spaces. And if all viewers set Tab to 4 spaces, the code appear uniformly wherever it is loaded.
Thanks.
Yan