Quote:
Originally Posted by KLS
(moving to spaces over tabs for instance)
|
I disagree with spaces over tabs. I think it would be fine to use spaces over tabs in cases such as structs or comments, just to standardize them, but for everything else (like tabbing out functions), I think spaces would suck.
Spaces are much harder to tell if you have the correct number of them for the current line you are writing. Of course, most editors will set you at the correct place automatically, but accidentally deleting an extra space will throw off the whole block you are working on if you keep working from that line on.
All decent editors allow you to tab out blocks of code by selecting the code and hitting tab X number of times. If you try that with space, it deletes your code and replaces it with a space. Even manually cleaning up formatting with this technique is much easier than doing it line by line with spaces.
If you are writing a new line of code and at the beginning of the line, you can hit tab a few times to put your code's start at the right position, but spaces would be a lot more. That is assuming you mean using multiple spaces in place of each tab. If planning to use a single space in place of each tab, that would just make it that much harder to read the format IMO.
Tabbing allows for easier movement around the source. I am sure there are alternatives to get around quickly, but tabs keep it nice and simple.
The only advantage I am aware of that spaces give over tabs is that all editors will display them the same so everything will line up no matter what you are using to view/edit the source. This is nice, but I think the benefits of tabs far outweighs a few comments (or whatever) not lining up. Maybe I am missing something?
I should have mentioned this in IRC when it was discussed a while back, but by the time I saw it the conversation had moved on and I forgot to get back to it.
Of course, it isn't my call and I am sure everyone can get by with whichever path is chosen. I just prefer stuff being easier/faster vs. lining up 100% of the time in every possible view. It will be great to have set standards for the project though. Many people are used to different styles and there is quite a mix in the source. At least with standards, some real formatting cleanup can be done throughout the source and not have people cleaning it up in their own way