Tabs vs Spaces
-
l a u r e n wrote: i was thinking people who use spaces should be shot Then I'll meet you behind the church at dawn!
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
Wrong options. Do you: 1) use spaces in your code? 2) prefer to die now?
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
What happened to: Free speech? The pursuit of happiness? Life? Liberty? ;) ;P Ok, just teasing.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiDon'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.
-
Wrong options. Do you: 1) use spaces in your code? 2) prefer to die now?
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
Being safely on the other side of the planet... So what's so bad about tabs??? Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files" -
Being safely on the other side of the planet... So what's so bad about tabs??? Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"Marc Clifton wrote: So what's so bad about tabs??? Spot the guy who doesn't have to work with other developers :rolleyes: Sigh...
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
l a u r e n wrote: people who use spaces should be shot I agree. I never use spaces. Or tabs. Or carriage returns, for that matter. Onelonglineofcodeafteranothershouldbeclearenoughforanyone;Thesemicolonsandcurlybracketsareeasyformachinestoreadanditdoesn'tmatterwhetherotherpeoplecanmakesenseofitwhenI'mdonebecauseit'salreadyperfectasitis.
"Ask not for whom the bell tolls;
It tolls for thee..." -
-
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. 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
-
Marc Clifton wrote: So what's so bad about tabs??? Spot the guy who doesn't have to work with other developers :rolleyes: Sigh...
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
If you want us to see it your way, at least tell us why tabs are so bad.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhijdunlap 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.
-
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.
But I thought that's the whole point of tabs - you only type one tab per indent level, and everyone can set their own setting for the number of character widths a tab is made up of.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
But I thought that's the whole point of tabs - you only type one tab per indent level, and everyone can set their own setting for the number of character widths a tab is made up of.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiIn a perfect world, that's perhaps what would happen. In practice, it never does. People often want to lay things out (e.g. in comments) but align on columns that are not at tabstops. So they type TAB TAB SPACE SPACE "xxx". Which ends up unreadable unless you have your tabstops set the same.
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
In a perfect world, that's perhaps what would happen. In practice, it never does. People often want to lay things out (e.g. in comments) but align on columns that are not at tabstops. So they type TAB TAB SPACE SPACE "xxx". Which ends up unreadable unless you have your tabstops set the same.
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
Sounds like a catch-22 to me. :( To each, his own choice (but then, of course, everyone gets the results of each other's choice as well as their own).
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
Sounds like a catch-22 to me. :( To each, his own choice (but then, of course, everyone gets the results of each other's choice as well as their own).
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhijdunlap wrote: Sounds like a catch-22 to me. Not at all. If you always use spaces, everything will align correctly regardless of what anybody's tab settings are.
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
jdunlap wrote: Sounds like a catch-22 to me. Not at all. If you always use spaces, everything will align correctly regardless of what anybody's tab settings are.
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
:rose: I like my indenting to be more than one character width, and I don't want to have to go space-space-space-space for each indent. :rose: Things can get really messed up with spaces, as it takes so many spaces for an indent. Why not use spaces for comments, etc, and then tabs for other indents?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
:rose: I like my indenting to be more than one character width, and I don't want to have to go space-space-space-space for each indent. :rose: Things can get really messed up with spaces, as it takes so many spaces for an indent. Why not use spaces for comments, etc, and then tabs for other indents?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhijdunlap 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.
-
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.
Ahh... You're right! I checked into it, and I've been using them all along - just used the tab key to indent. :-O :-O
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
Ahh... You're right! I checked into it, and I've been using them all along - just used the tab key to indent. :-O :-O
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiGood lad :-D ;P
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
Good lad :-D ;P
Software is everything. It also sucks. Charles Fishman [^] Awasu 1.0.4 (beta)[^]: A free RSS reader with support for Code Project.
-
l a u r e n wrote: people who use spaces should be shot I agree. I never use spaces. Or tabs. Or carriage returns, for that matter. Onelonglineofcodeafteranothershouldbeclearenoughforanyone;Thesemicolonsandcurlybracketsareeasyformachinestoreadanditdoesn'tmatterwhetherotherpeoplecanmakesenseofitwhenI'mdonebecauseit'salreadyperfectasitis.
"Ask not for whom the bell tolls;
It tolls for thee..."Amazingly I could read that... :omg:
Hawaian shirts and shorts work too in Summer. People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage... -Anna-Jayne Metcalfe on Paintballing