Visual Studio 2010 Forces Tab Indenting
An anonymous reader writes "For years, Microsoft has allowed Visual Studio users to define arbitrary tab widths, often to the dismay of those viewing the resultant code in other editors. With VS 2010, it appears that they have taken the next step of forcing tab width to be the same as the indent size in code. Two-space tabs anyone?"
This tab thing makes Slashdot front page and the following didnt? Windows 7 way hotter than Vista off the line, now more popular than all OS X versions. Okay then...
How is this tab things news or interesting at all? Here is what Brittany Behrens a PM for the editor team said:
(bolding above mine for emphasis)
Gee, the team solicited comments, did some research and made a change that people wanted. Of course, any change will make somebody unhappy.
Brittany even volunteered to give folks a simple editor extension to make the settings different for those that want it. My assumption is that anyone using Visual Studio is a developer and capeable of using such an extension, or writing it themselves. It is not difficult.
-Foredecker
Jibe!
They're a meta character, and the meaning can be changed later.
* If I'm hitting the tab key and it's inserting X spaces, and I hit the key once too many times, I have to hit delete X times instead of just once.
* If the code is reused in a new environment where everyone wants their indentation levels at 4 spaces instead of 2 or 3 or 8, you have to reformat a lot of code manually. If tabs are used, remap the sizing of the tab character and you're done.
* The tab character itself has some semantic meaning - indent. The space is a word and symbol separator. Use an indentation character when you want to indicate indentation.
creation science book
The biggest benefit to tabs (especially if you code in a corporate environment) is that people can view the code based on *their* preferred indentation / spacing e,.g. I may like my tabs to be 2 spaces, another developer may prefer 3 or 4 spaces.
By setting up their IDE / editor to their preferred tab width, the code indents to the way they like it.
By forcing all your tabs to be spaces, anyone else viewing the code will be forced to view / edit it in your indentation.
So, for all those tab fans, what is it about tabs that you find useful?
So there you go. In addition to just being more manageable and flexible, using tabs over spaces will help ensure the future existence of the human species on this planet.
Okay, so while the last point was in jest (mostly ;), I stand by the first four. Honestly, I've yet to see any pro-spaces people give any substantial reasons (when applied to modern computers and development tools) that spaces work better than tabs.
So, for all those space fans, what is it about spaces that you find useful?
"What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
/)
I find the use of spaces irritating and stupid, to be equally blunt. I mean, the tab is a character that exists _specifically_ for aligning text. It behaves predictably across editors [...]
Not in my experience it doesn't!
You never have to worry about half indents choking the editor.
I don't understand what you mean by this.
Why replace tabs with spaces? So you can hit the space bar a thousand times whenever you need to edit something outside a programming editor?
Ironically, one of the reasons I prefer to use spaces is so that the code is readable when I do want to edit (or view) something outside of the programming editor. Code with tabs in it is usually completely messed up.
Ah, well, it'd be a funny old world if we were all the same!
I know it's bad form to reply to yourself, but really Slashdot? THAT is how you render an HTML ordered list? What blind, drunk monkey on an acid trip designed that stylesheet?
Of course the icing on the cake is that in the preview it was properly rendered as an ordered numeric list. WTF, Taco?
Oh, look at the name of the CSS files responsible: idlecore-tidied.css. Makes sense now I suppose. Anything to do with idle.slashdot is already horribly broken.
"What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
/)
Comment removed based on user account deletion