Tabs vs Spaces
-
People who use tabs should be shot!!!
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
The first thing I do when I open a code file that isn't mine is CTRL+A ALT+F8. And if that doesn't catch them all, a quick "Tabify selection" does the trick. :-D So when should I expect to see you?
David Wulff
"It is a helpless feeling to be unable to make something so terribly wrong... right."
-
Don't sweat the petty stuff. Spaces vs. tabs is much more important :-|
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
Don't sweat the petty stuff and don't pet the sweaty stuff. What is Chris Meech that said that, it rings a bell? :)
David Wulff
"It is a helpless feeling to be unable to make something so terribly wrong... right."
-
jdunlap wrote: I don't want to have to go space-space-space-space for each indent. Virtually every editor on the planet has a switch to insert spaces instead of tabs. jdunlap wrote: Why not use spaces for comments, etc, and then tabs for other indents? Consistency. If you use one of the above-mentioned editors, then you don't have to remember anything.
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
Taka Muraoka wrote: Virtually every editor on the planet has a switch to insert spaces instead of tabs Yes, but what about backspacing? :rolleyes:
David Wulff
"It is a helpless feeling to be unable to make something so terribly wrong... right."
-
The first thing I do when I open a code file that isn't mine is CTRL+A ALT+F8. And if that doesn't catch them all, a quick "Tabify selection" does the trick. :-D So when should I expect to see you?
David Wulff
"It is a helpless feeling to be unable to make something so terribly wrong... right."
David Wulff wrote: The first thing I do when I open a code file that isn't mine is CTRL+A ALT+F8. S.Rod suggested the same thing but this is not the answer. 1) Not everyone uses Visual Studio. I ran into this problem the most when I was working under UNIX. 2) Checking such a file back into source control is a real PITA because it becomes really hard to tell what is a legitimate change and what is tab-fixing. David Wulff wrote: So when should I expect to see you? Any time. Any place. :-|
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
Tabs. I just find them easier, especially when arrowing through code (takes less time to go through tabs than it does spaces.) And now that's dictated in our team's coding standard. :-D Although with all the nifty souce formatting tools out there (including what's included in Visual), it doesn't matter as much as it used to... back in the days when taking out a block of code embedded deep in a loop and putting it into its own function meant a day's worth of work deleting all the extra spaces. "When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
-
jdunlap wrote: tell us why tabs are so bad. Have you ever had to work on source code written by somebody who had their tab stops set differently to you?
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
I know that this is quite a heated debate and I was always on the "Tabs forever" side of the argument but recently I've switched to spaces instead of tabs (due to factors outside of my control) and to be honest, I'm LOVING it. Now I can align all my code the way I like it and not have to worry about the tabs lining up with the parenthesis. What do you guys mostly use? Do your companies have a convention on this?
Tabs :) The tigress is here :-D
-
I know that this is quite a heated debate and I was always on the "Tabs forever" side of the argument but recently I've switched to spaces instead of tabs (due to factors outside of my control) and to be honest, I'm LOVING it. Now I can align all my code the way I like it and not have to worry about the tabs lining up with the parenthesis. What do you guys mostly use? Do your companies have a convention on this?
Tabs of course. If God did not wanted us to use tabs to indent, he would have made Bill remove the Tab-key from the Windows keyboards. That being said, I do admit that I only use Tabs for the leftmost columns. If I ever type in some text after a tab, then I will only use spaces. This way the code will look just fine and dandy in any editor and I am not enforcing my tabsize=4 setting anybody who are tabsize!=4. I'm such a nice guy, really. :-) -- "It's a condition of mental divergence, I find myself on the planet Olgo part of a intellectual elite, prepared to subjugate the barbarian hordes on Pluto, but even though this is a totally convincing reality for me in every way, nevertheless Olgo is actually a construct on my psychee. I am mentally divergent in that I am escaping certain unnamed realities that plague my life here."
-
People who use tabs should be shot!!!
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
Taka Muraoka wrote: People who use tabs should be shot!!! With a cannon preferably.:-D Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
-
Spaces. That way I don't have to worry what editor is used, the code will always look the same. --
"The money power of the country will endeavor to prolong its rule by preying upon the prejudices of the people until all wealth is concentrated in a few hands and the Republic destroyed." -- Abraham Lincoln
Robert Little wrote: Spaces. That way I don't have to worry what editor is used, the code will always look the same. That's the same reason I use spaces.