Tabs vs Spaces
Moderators: phlip, Moderators General, Prelates
Tabs vs Spaces
IMHO tabs are more correct because the length of a tab is non defined.
Discuss.
Discuss.
- crazyjimbo
- Posts: 887
- Joined: Fri Apr 20, 2007 11:45 pm UTC
- Location: Durham, England
- Contact:
Re: Tabs vs Spaces
It makes no odds really. Both have slight advantages over the other but I find that if I use tabs, it only takes 1 space to mess everything up, and cause what looks fine in your editor to look like garbled crap in someone else's. Also, to pass functions with arguments split over many lines, if you use tabs then you need to tab into your main block and then use spaces to line up your arguments. This isn't fun and generally gets done wrong. This is why I play safe and stick to spaces.
Above all though, BE F*CKING CONSISTENT!
EDIT:
That's a problem. How can something that can look different on everyone's computer be a good standard for consistent presentation?
Above all though, BE F*CKING CONSISTENT!
EDIT:
IMHO tabs are more correct because the length of a tab is non defined.
That's a problem. How can something that can look different on everyone's computer be a good standard for consistent presentation?
Re: Tabs vs Spaces
crazyjimbo wrote:That's a problem. How can something that can look different on everyone's computer be a good standard for consistent presentation?
For the same reason that it doesn't matter two hoots what font someone chooses for their editor.
Properly used, tabs are better because it allows people to choose the level of indent they want. However, they are somewhat hard to properly use, and it's hard to verify that a use is correct in a way that you can continually glance. (Coloring tabs or something like that doesn't count; too visually busy and ugly when you're trying to work on stuff.)
Re: Tabs vs Spaces
Can we all agree that anybody who mixes tabs and spaces for indentation will spend an eternity burning in hell, though?
- crazyjimbo
- Posts: 887
- Joined: Fri Apr 20, 2007 11:45 pm UTC
- Location: Durham, England
- Contact:
Re: Tabs vs Spaces
EvanED wrote:crazyjimbo wrote:That's a problem. How can something that can look different on everyone's computer be a good standard for consistent presentation?
For the same reason that it doesn't matter two hoots what font someone chooses for their editor.
My main gripe with their inconsistency is the point I mentioned above in that you need to switch between tabs and spaces to get consistent indenting of multiline methods. E.g.
Code: Select all
if something then
my_method(argument_1,
argument_2);
<tabs>< spaces >
end
The fact we need to do this stems from tabs not being consistent across environments and this is thus a problem. It relies far too much on us humans being good at indenting. Considering we can't even see what we are doing/have done, this is too much to ask.
On a related note, I hope everyone agrees that tabs should be 4 spaces

EDIT: Apparently code boxes don't preserve formatting any more.

Re: Tabs vs Spaces
crazyjimbo wrote:My main gripe with their inconsistency is the point I mentioned above in that you need to switch between tabs and spaces to get consistent indenting of multiline methods. E.g.
...
The fact we need to do this stems from tabs not being consistent across environments and this is thus a problem. It relies far too much on us humans being good at indenting. Considering we can't even see what we are doing/have done, this is too much to ask.
Yes, I agree. That's why it's hard.
On a related note, I hope everyone agrees that tabs should be 4 spaces
Unfortunately, not everyone does. There's some people in the one-true-style thread I think who think it should be a heretical 2 spaces.

Re: Tabs vs Spaces
I like a compromoise. My IDE (VS2005) inserts spaces when I press [tab], and also when backspacing whitespace it deletes spaces as if they were tabs. So I have all the convenience of tabs, and all the benefits of spaces.
Re: Tabs vs Spaces
Sc4Freak wrote:I like a compromoise. My IDE (VS2005) inserts spaces when I press [tab], and also when backspacing whitespace it deletes spaces as if they were tabs. So I have all the convenience of tabs, and all the benefits of spaces.
Arg, no, that's the worst of both worlds. You get the fiddlyness of tabs on your login, and the lack of control on other environments.
- Amnesiasoft
- Posts: 2573
- Joined: Tue May 15, 2007 4:28 am UTC
- Location: Colorado
- Contact:
Re: Tabs vs Spaces
Tabs for indent. Spaces for alignment. Is it really that difficult? My brain says it's easy, but the uneducated masses say it's difficult.
Re: Tabs vs Spaces
I go with amnesiasoft. I find it so much easier to just mix the two - if someone else really, really wants to read my code, it's usually well commented. I'm generallyonly use one editor per project, so no layout problems when I want to change something.
hermaj wrote:No-one. Will. Be. Taking. Cheese's. Spot.
Spoiler:
Re: Tabs vs Spaces
Vim documentation recommends always letting vim show the tab as (up to) eight spaces as thats the standard others will use (set tabstop=8). Then it will look the same everywhere.
Then you can use shiftwidth and softtabstop settings to control the amount of "visible whitespace" the tab, indent, unindent and backspace key will insert/remove. Soft tabs are composed of hard tabs and spaces.
So if you do it like this, you can indent as many whitespaces as you like (e.g. 4) and the only difference is whether you save seven bytes each time you see eight spaces worth of white space.
Then you can use shiftwidth and softtabstop settings to control the amount of "visible whitespace" the tab, indent, unindent and backspace key will insert/remove. Soft tabs are composed of hard tabs and spaces.
So if you do it like this, you can indent as many whitespaces as you like (e.g. 4) and the only difference is whether you save seven bytes each time you see eight spaces worth of white space.
phlip wrote:Ha HA! Recycled emacs jokes.
Re: Tabs vs Spaces
tabs are faster...
42
--
If God intended us to program we would be born with serial I/O ports.
--
If God intended us to program we would be born with serial I/O ports.
- Anpheus
- I can't get any worse, can I?
- Posts: 860
- Joined: Fri Nov 16, 2007 10:38 pm UTC
- Location: A privileged frame of reference.
Re: Tabs vs Spaces
I find tabs or spaces fine, though I prefer to edit any release code to replace tabs with spaces so that it looks the same to everyone else (and honestly, if you're editing code with a box that doesn't have regex to do the reverse, what the fuck development environment are you running there?)
What I find insane is the eight spaces per tab, it's creates really awful spread-eagle code that rapidly becomes wider than my widescreen monitor. Combine eight spaces per tab with the 100-odd nonstandard characters that different projects will decide is the end of a line arbitrarily, and pretty soon you get unreadable code. Combine that with all a manner of personal preferences for different type and variable naming, and you get insanity.
Uniformity here, that's all I ask for. If everything just looks uniform I'll be happy. I don't care if it's tabs only (don't align shit if you do this though,) spaces, tabs and spaces, or whatever whitespace character you want, as long as I can change how it looks on my box. Most of the time a few regex find&replace ops will give me something I'll be ok using.
What I find insane is the eight spaces per tab, it's creates really awful spread-eagle code that rapidly becomes wider than my widescreen monitor. Combine eight spaces per tab with the 100-odd nonstandard characters that different projects will decide is the end of a line arbitrarily, and pretty soon you get unreadable code. Combine that with all a manner of personal preferences for different type and variable naming, and you get insanity.
Uniformity here, that's all I ask for. If everything just looks uniform I'll be happy. I don't care if it's tabs only (don't align shit if you do this though,) spaces, tabs and spaces, or whatever whitespace character you want, as long as I can change how it looks on my box. Most of the time a few regex find&replace ops will give me something I'll be ok using.
Spoiler:
Re: Tabs vs Spaces
Anpheus wrote:(and honestly, if you're editing code with a box that doesn't have regex to do the reverse, what the fuck development environment are you running there?)
That will mess up any spaces being used for alignment.
- Anpheus
- I can't get any worse, can I?
- Posts: 860
- Joined: Fri Nov 16, 2007 10:38 pm UTC
- Location: A privileged frame of reference.
Re: Tabs vs Spaces
In which case, I'll fix it. I'm more concerned about consistency than occasional errors. Obviously tabs for indent, spaces for alignment is best. If I need to, I'll change it by hand, but be consistent. I don't want every file I open to require different changes.
Spoiler:
Re: Tabs vs Spaces
I'm currently using four space (as in space) indents when writing Python, but after reading this I'll likely use tabs in the future. Oh, and 80 chars width.
Re: Tabs vs Spaces
What are people talking about when they say "alignment" anyway?
Re: Tabs vs Spaces
zenten wrote:What are people talking about when they say "alignment" anyway?
We've had that discussion before. It's sorta in the wrong thread, but oh well, such is life.

- Anpheus
- I can't get any worse, can I?
- Posts: 860
- Joined: Fri Nov 16, 2007 10:38 pm UTC
- Location: A privileged frame of reference.
Re: Tabs vs Spaces
For example:
That's with spaces to align the top and bottom lines.
Now it gets really terrible if you use tabs, let's say I use a 4-space tab and use tabs:
Still works on my computer. But somebody else opens it with an eight space tab:
Looks awful.
In addition, I could use two tabs instead of 1 on my screen and then it'd be twice as far off. Basically, tabs and spaces should only be used like so:
Tabs to bring you up to the current level of indentation, that way anyone can set tabs to as many characters as they prefer, and spaces to line up two lines of code. And -do not- line up code between different levels of indentation.
Code: Select all
int func(long variable_name, long variable_name_two, long variable_name_three,
_ _ _ _ _long variable_name_four, long...
That's with spaces to align the top and bottom lines.
Now it gets really terrible if you use tabs, let's say I use a 4-space tab and use tabs:
Code: Select all
int func(long variable_name, long variable_name_two, long variable_name_three,
--->_ _ _long variable_name_four, long...
Still works on my computer. But somebody else opens it with an eight space tab:
Code: Select all
int func(long variable_name, long variable_name_two, long variable_name_three,
------->_ _ _long variable_name_four, long...
Looks awful.
In addition, I could use two tabs instead of 1 on my screen and then it'd be twice as far off. Basically, tabs and spaces should only be used like so:
Code: Select all
class foo {
--->
--->void foo() { }
--->
--->int func(long variable_name, long variable_name_two, long variable_name_three,
--->_ _ _ _ _long variable_name_four, long variable_name_five) {
--->--->for (int i = 0; i < 10; i++) {
--->--->--->bar fubar = new bar(5, //argument 1
--->--->---> _ _ _ _ _ _ _ _ _ _"six", //argument 2
--->--->---> _ _ _ _ _ _ _ _ _ _7.0, //argument 3
--->--->---> _ _ _ _ _ _ _ _ _ _'\7'); //argument 4
--->--->}
--->}
}
Tabs to bring you up to the current level of indentation, that way anyone can set tabs to as many characters as they prefer, and spaces to line up two lines of code. And -do not- line up code between different levels of indentation.
Spoiler:
Re: Tabs vs Spaces
crazyjimbo wrote:On a related note, I hope everyone agrees that tabs should be 4 spaces
Dingbats wrote:I'm currently using four space (as in space) indents when writing Python, but after reading this I'll likely use tabs in the future. Oh, and 80 chars width.
I have my editor set up so that hitting tab gives me fours spaces. That way I can indent my code and be sure that it won't fuck up when I open it in any other editor. Or, god forbid, if I ever subject someone else to the horror that is my code.
(79 char width though, some editors wrap the 80th character to a new line).
I'm not lazy, I'm just getting in early for Christmas is all...
Re: Tabs vs Spaces
Definitely tabs (4 spaces wide), no alignement, 120 chars per line.
Tabs because I'm used to them (and don't like having to press backspace 4 times to go back down 1 tab).
No alignement because I think that a single tab do the trick :
120 chars per line because I use wide screens on a graphical interface (fill nicely on a 17" monitor, a little bit more than half the screen on a wide 24" screen).
And I agree that people that aren't consistent must spend an eternity burning in hell (or whatever equivalent in the religion of your choice).
And above all, I can't stand trailing white characters... But that's just me...
Tabs because I'm used to them (and don't like having to press backspace 4 times to go back down 1 tab).
No alignement because I think that a single tab do the trick :
Code: Select all
protected virtual void myFun(object myFirstArgumentWichIsAnObjectAndHasAVeryLongName,
--->object mySecondArgumentWichIsAnObjectAndHasAVeryLongName)
{
--->if (test1
--->--->&& test2)
--->{
--->--->[blah blah blah]
--->}
}
120 chars per line because I use wide screens on a graphical interface (fill nicely on a 17" monitor, a little bit more than half the screen on a wide 24" screen).
And I agree that people that aren't consistent must spend an eternity burning in hell (or whatever equivalent in the religion of your choice).
And above all, I can't stand trailing white characters... But that's just me...
Re: Tabs vs Spaces
Dongorath wrote:(and don't like having to press backspace 4 times to go back down 1 tab).
Lol @ ur editor

In vim you increase/decrease indenting in steps of your own choosing (e.g. 4). It doesn't matter where on the line the cursor is, you just press << or >>. Or, if you want the current code block indented: >iB (means "indent inner block"). Or you can just select a number of lines and then < and > them.
But of course there's autoindenting, so manual indenting isn't needed that much. The = operator even indents lines according to the autoindent feature. That means: paste som crappy formatted code, press gg=G (re-indent whole buffer) and profit!
I can't say how you do it in other editors, because I don't need others

phlip wrote:Ha HA! Recycled emacs jokes.
Re: Tabs vs Spaces
For documents, tabs for obvious reasons. Documents don't use monospaced fonts, and indentation is the purpose there.
For code, always spaces. Tabs irritate the hell out of me in code. Making readable code means aligning things in a certain way, and tabs = inconsistent alignment, particularly since code should be in monospaced font anyway.
Also, I use 3 spaces for tabs and indentation in code. KF
For code, always spaces. Tabs irritate the hell out of me in code. Making readable code means aligning things in a certain way, and tabs = inconsistent alignment, particularly since code should be in monospaced font anyway.
Also, I use 3 spaces for tabs and indentation in code. KF
~Kizyr


- headprogrammingczar
- Posts: 3072
- Joined: Mon Oct 22, 2007 5:28 pm UTC
- Location: Beaming you up
Re: Tabs vs Spaces
I personally use alternating tabs and spaces, and end all my sentances with semicolons;;
I also add random spaces in inconvenient places and exploit the use of plurality in sentances;;;
I also add random spaces in inconvenient places and exploit the use of plurality in sentances;;;
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you
- Amnesiasoft
- Posts: 2573
- Joined: Tue May 15, 2007 4:28 am UTC
- Location: Colorado
- Contact:
Re: Tabs vs Spaces
Kizyr wrote:For code, always spaces. Tabs irritate the hell out of me in code. Making readable code means aligning things in a certain way, and tabs = inconsistent alignment, particularly since code should be in monospaced font anyway.
Then you obviously don't know how to use tabs. Tabs are made for indenting because they can be set to whatever size the reader wants. Spaces are use for alignment for the EXACT SAME REASON you use tabs for indenting. Mix them together for ultimate profit!
- Anpheus
- I can't get any worse, can I?
- Posts: 860
- Joined: Fri Nov 16, 2007 10:38 pm UTC
- Location: A privileged frame of reference.
Re: Tabs vs Spaces
Dongorath wrote:Definitely tabs (4 spaces wide), no alignement, 120 chars per line.
Tabs because I'm used to them (and don't like having to press backspace 4 times to go back down 1 tab).
No alignement because I think that a single tab do the trick :Code: Select all
protected virtual void myFun(object myFirstArgumentWichIsAnObjectAndHasAVeryLongName,
--->object mySecondArgumentWichIsAnObjectAndHasAVeryLongName)
{
--->if (test1
--->--->&& test2)
--->{
--->--->[blah blah blah]
--->}
}
120 chars per line because I use wide screens on a graphical interface (fill nicely on a 17" monitor, a little bit more than half the screen on a wide 24" screen).
And I agree that people that aren't consistent must spend an eternity burning in hell (or whatever equivalent in the religion of your choice).
And above all, I can't stand trailing white characters... But that's just me...
HERETIC!
There's a problem with your definition of alignment. You aren't aligning anything except by coincidence ("if (" is four characters, but "while (" is seven.) If you were aligning text, you would end up with horrible, horrible looking code to other people whose tabs are set differently.
For example:
Code: Select all
------->if (test1
------->------->&& test2)
Code: Select all
->if (test1
->->&& test2)
Using spaces you get a perfect result no matter what tab setting you use:
Code: Select all
->if (test1
-> _ _&& test2)
Code: Select all
-->if (test1
--> _ _&& test2)
Code: Select all
---->if (test1
----> _ _&& test2)
Code: Select all
-------->if (test1
--------> _ _&& test2)
Spoiler:
Re: Tabs vs Spaces
Anpheus wrote:There's a problem with your definition of alignment. You aren't aligning anything except by coincidence ("if (" is four characters, but "while (" is seven.)
That's why he said no alignment.
I agree that the properly-aligned code looks better.
Re: Tabs vs Spaces
EvanED wrote:zenten wrote:What are people talking about when they say "alignment" anyway?
We've had that discussion before. It's sorta in the wrong thread, but oh well, such is life.
Tabs align that just fine. In fact, that's the whole point of tabs, otherwise you just have a macro for a set number of spaces, which is much less useful.
Re: Tabs vs Spaces
zenten wrote:Tabs align that just fine. In fact, that's the whole point of tabs, otherwise you just have a macro for a set number of spaces, which is much less useful.
No they don't. Did you read the post Anpheus just posted, like 30 minutes ago, in this very thread?
If you are using tabs for alignment, things will align at exactly one tab setting, and this setting differs between control constructs and what you are trying to align. "Coincidentally", that setting is exactly the number of spaces that should have been inserted instead of a tab.
- Anpheus
- I can't get any worse, can I?
- Posts: 860
- Joined: Fri Nov 16, 2007 10:38 pm UTC
- Location: A privileged frame of reference.
Re: Tabs vs Spaces
How is it 'less useful.' The difference between spaces and tabs here is fairly arbitrary.
Spoiler:
Re: Tabs vs Spaces
EvanED wrote:zenten wrote:Tabs align that just fine. In fact, that's the whole point of tabs, otherwise you just have a macro for a set number of spaces, which is much less useful.
No they don't. Did you read the post Anpheus just posted, like 30 minutes ago, in this very thread?
If you are using tabs for alignment, things will align at exactly one tab setting, and this setting differs between control constructs and what you are trying to align. "Coincidentally", that setting is exactly the number of spaces that should have been inserted instead of a tab.
It hasn't in any editors I've tried this with.
- Anpheus
- I can't get any worse, can I?
- Posts: 860
- Joined: Fri Nov 16, 2007 10:38 pm UTC
- Location: A privileged frame of reference.
Re: Tabs vs Spaces
What are you talking about? Open up Notepad++ or any editor that lets you configure tab size.
Switch to a 4 space tab.
Type:
The ---> is a tab.
Then switch to an eight space tab. You get:
It's no longer aligned.
Switch to a 4 space tab.
Type:
Code: Select all
if (x
--->&& y)
The ---> is a tab.
Then switch to an eight space tab. You get:
Code: Select all
if (x
------->&& y)
It's no longer aligned.
Spoiler:
Re: Tabs vs Spaces
Anpheus wrote:What are you talking about? Open up Notepad++ or any editor that lets you configure tab size.
Switch to a 4 space tab.
Type:Code: Select all
if (x
--->&& y)
The ---> is a tab.
Then switch to an eight space tab. You get:Code: Select all
if (x
------->&& y)
It's no longer aligned.
Oh!
Ok, I didn't get what you were saying.
Simple solution really:
if<tab>(x
<tab>&& y)
- Anpheus
- I can't get any worse, can I?
- Posts: 860
- Joined: Fri Nov 16, 2007 10:38 pm UTC
- Location: A privileged frame of reference.
Re: Tabs vs Spaces
Which doesn't work everywhere and for everything. For example, a while block at an eight space tab versus four space tab:
Eight space tab:
Four space tab:
As you can see, while being five characters long exceeds a tab boundary, causing misalignment.
C++ keywords sorted by length:
If you use an eight space tab, your code will fuck up anything at or longer than eight characters. That's fourteen different keywords. At a four space tab, you'd fuck up forty-nine different keywords. At a three space tab, all but two.
And that's not counting alignment with typedefs, variables, and classes. I think your code probably uses those.
Eight space tab:
Code: Select all
Tab boundaries:
-------|-------|
while-->(
------->&&stuff
Four space tab:
Code: Select all
Tab boundaries:
---|---|---|---|
while-->(
--->&&stuff
As you can see, while being five characters long exceeds a tab boundary, causing misalignment.
C++ keywords sorted by length:
Code: Select all
do
if
asm
for
new
try
auto
case
else
enum
goto
this
TRUE
void
break
catch
class
const
FALSE
throw
union
using
while
delete
export
extern
friend
inline
public
return
signed
sizeof
static
struct
switch
typeid
default
mutable
private
typedef
virtual
continue
explicit
operator
register
template
typename
unsigned
volatile
namespace
protected
const_cast
static_cast
dynamic_cast
reinterpret_cast
If you use an eight space tab, your code will fuck up anything at or longer than eight characters. That's fourteen different keywords. At a four space tab, you'd fuck up forty-nine different keywords. At a three space tab, all but two.
And that's not counting alignment with typedefs, variables, and classes. I think your code probably uses those.
Spoiler:
Re: Tabs vs Spaces
Mmm, this should have been a poll. Still, I'm glad to see that most of you agree with me, and are thus smart. Tabs for indentation, spaces for further alignment, if you must.
I think one's opinion on this can tell you how pedantic a person is. The key advantage of tabs is semantic clarity: indenting and aligning convey different information, so it makes sense to use a different symbol. Otherwise, what's '\t' even for? The disadvantage is that it falls apart if people don't use it conscientiously. Now, as a pedant, I think the latter is irrelevant - people should use it conscientiously, and if they don't, let them suffer.
Compilers demand everything be perfect. You can react in two ways: either you get pissed off about it, and just keep compiling your imperfect code over and over until it works, or you accept it, and try to be disciplined. People who are willing to accept the discipline necessary to indent properly with tabs, even though it won't actually break anything if the code is ugly, are more likely to take the second approach to the strict requirements of programming, and thus are more likely to be better coders. (Correlation does not imply causation.)
I think one's opinion on this can tell you how pedantic a person is. The key advantage of tabs is semantic clarity: indenting and aligning convey different information, so it makes sense to use a different symbol. Otherwise, what's '\t' even for? The disadvantage is that it falls apart if people don't use it conscientiously. Now, as a pedant, I think the latter is irrelevant - people should use it conscientiously, and if they don't, let them suffer.
Compilers demand everything be perfect. You can react in two ways: either you get pissed off about it, and just keep compiling your imperfect code over and over until it works, or you accept it, and try to be disciplined. People who are willing to accept the discipline necessary to indent properly with tabs, even though it won't actually break anything if the code is ugly, are more likely to take the second approach to the strict requirements of programming, and thus are more likely to be better coders. (Correlation does not imply causation.)
Re: Tabs vs Spaces
I agree, spaces for alignment. But hey, spaces for indentation too.
The problem in having your editor showing tabs as 4 spaces is that it won't look the same in another guys editor! And this is important if you're concerned about your code maxing at 80 cols...
The problem in having your editor showing tabs as 4 spaces is that it won't look the same in another guys editor! And this is important if you're concerned about your code maxing at 80 cols...
phlip wrote:Ha HA! Recycled emacs jokes.
Re: Tabs vs Spaces
enk wrote:I agree, spaces for alignment. But hey, spaces for indentation too.
The problem in having your editor showing tabs as 4 spaces is that it won't look the same in another guys editor!
I vote this as a feature, not bug.
And this is important if you're concerned about your code maxing at 80 cols...
Nah, not really. Just redefine "lines should be less than 80 characters" as "lines should be less than 80 characters with a 4-character tab stop."
If someone using an 8-character stop has to deal with lines longer than 80 characters, then too bad; he can just set it to 4-character stops, and you're almost no worse off than if you had used spaces in the first place. (In fact, if this person is editing the code, he'd probably need to change settings anyway if you used spaces, lest he start inserting 8 of them where there should only be 4.) At least with tabs you've given him a choice of (1) not worrying about the 80-col limit, (2) saying that his preference for 8-space tabs overrides his preferences for 80-col limits and leaving the settings the same, and (3) saying his preference for 80-col limits overrides his preferences for 8-space tabs and changing to shorter tabs.
Re: Tabs vs Spaces
The editor I use converts tabs to spaces. I use 3 spaces per tab, and I don't have to work on anybody else's code, so it's alright....
Re: Tabs vs Spaces
Anpheus wrote:HERETIC!
There's a problem with your definition of alignment. You aren't aligning anything except by coincidence ("if (" is four characters, but "while (" is seven.) If you were aligning text, you would end up with horrible, horrible looking code to other people whose tabs are set differently.
Ok, bad exemple for the if and the four spaces tab, but that's why I said "no alignment". In my exemple, the second argument of my function is in no way aligned to the first one. That's why I said no alignment, just one more tab. Two if you really want to distinguish it from the subsequent indented block/line of code...
Re: Tabs vs Spaces
I'm at uni, so it is just myself that works on my code. Also, my TA uses the same IDE I do (VS 2005 with (mostly) default settings) so I need not worry about inconsistencies between editors. As long as I am consistent in my code (which I am), then I am happy, and so is everyone else. On a side note, my CS 115 prof. uses spaces to pad when she forgets a tab (or rather, destroys one that VS made), which annoys the hell out of me, just like Allman indentation, but that's for that other thread.
Open source sigs? Here, use mine!
Who is online
Users browsing this forum: No registered users and 5 guests