tabs versus spaces
Moderator: General Moderators
tabs versus spaces
Is there a reason why you use one and wouldn't like the other?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: tabs versus spaces
Are you trying to start another T vs S flamewar?
This is one of those "vi" vs "emacs" discussions. Search around. I think we have talked about this before around here.
This is one of those "vi" vs "emacs" discussions. Search around. I think we have talked about this before around here.
Re: tabs versus spaces
I am not starting another war. I just happened to read that tabs in some programs give problems. I was looking for other problems or aruments for/against. I'm not aware this discussion causes flamewars but I'm aware answers like yours don't encourage polite responses.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: tabs versus spaces
I apologize if my answer did not come across politely. I have seen enough "OOP" vs "procedural", "vi" vs "emacs" and "tabs" vs "spaces" fights break out around here that I attempt to prevent them at the first sight of one.
My response was not an attempt at being mean, rude or confrontational. To the contrary, I am trying to prevent those types of responses from even being posted.
As to the core of your question, what have you heard? I have not heard of spaces causing problems before, except in the case of version control systems that show edits made when tabs are converted to spaces and vice versa.
My response was not an attempt at being mean, rude or confrontational. To the contrary, I am trying to prevent those types of responses from even being posted.
As to the core of your question, what have you heard? I have not heard of spaces causing problems before, except in the case of version control systems that show edits made when tabs are converted to spaces and vice versa.
Re: tabs versus spaces
Ok, I just don't like being called a troll when I have no intention to.
The problem was that some program messed up tabs. I can't remember what exactly it was but it may have to with layout. I consider switching to spaces for another reason too, being it seems easier to align things like long arrays or method chains. A disadvantage could be that it increases file size (maybe not much but everything counts).
The problem was that some program messed up tabs. I can't remember what exactly it was but it may have to with layout. I consider switching to spaces for another reason too, being it seems easier to align things like long arrays or method chains. A disadvantage could be that it increases file size (maybe not much but everything counts).
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: tabs versus spaces
Fair enough.koen.h wrote:Ok, I just don't like being called a troll when I have no intention to.
Many programs can be configured to handle tabs as spaces and vice versa. There are some folks that love an 8 space equivalent tab, others, like me, prefer a tab that is equal to 4 spaces. Others that I know use a 3 space tab.koen.h wrote:The problem was that some program messed up tabs. I can't remember what exactly it was but it may have to with layout. I consider switching to spaces for another reason too, being it seems easier to align things like long arrays or method chains. A disadvantage could be that it increases file size (maybe not much but everything counts).
I know there was a huge discussion about this topic about a year ago. The discussion was remarkably amicable and both sides of the argument for/against provided some very good reasons why you should/shouldn't use tabs/spaces.
I have never heard of a tab character screwing anything up. At least not in PHP, HTML, CSS, etc. I know there are some pretty strictly typed languages where white space has meaning. I am sure in a language like that a tab could knacker some stuff up pretty good.