Spaces vs Tabs

Spaces vs Tabs

  • Spaces

    Votes: 3 23.1%
  • Tabs

    Votes: 5 38.5%
  • Does not matter

    Votes: 0 0.0%
  • Hillary 2016! (for prison)

    Votes: 5 38.5%

  • Total voters
    13

Mike64

Platinum Member
Apr 22, 2011
2,108
101
91
(E) None of the above.

It depends on the type of font and what sort of formatting you're trying to achieve. With monospace fonts, it rarely if ever matters since you always know how much white space is actually involved relative to the printable characters. With proportional fonts, it can make a big difference if you're trying to "line things up", since the relative spacing can change with different fonts (and while I"m not quite sure of this, possibly the size of the type as well.)
 

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
(E) None of the above.

It depends on the type of font and what sort of formatting you're trying to achieve. With monospace fonts, it rarely if ever matters since you always know how much white space is actually involved relative to the printable characters. With proportional fonts, it can make a big difference if you're trying to "line things up", since the relative spacing can change with different fonts (and while I"m not quite sure of this, possibly the size of the type as well.)

He's not talking about writing a letter.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,697
4,658
75
iI prefer spaces.<Esc>1G=G$i with ViM<Esc>:x
 

Mike64

Platinum Member
Apr 22, 2011
2,108
101
91
He's not talking about writing a letter.
Neither was I. Though if he meant forum posts, the obvious answer is "does not matter" since bb formatting treats them the same without additional settings not typically available to forum posters, doesn't it?


Oops, never mind. In retrospect, I don't know what I thought that last word in his post was, but since this is in Off Topic rather than Programming, I didn't process that it was "compiler" or that the OP meant "in the context of code" until I saw the posts about Python and Lisp...

So as to the original question: spaces, all the way. They may not usually cause trouble, but in my limited experience anyway, no good can come of having extraneous non-printable characters floating around in a code file and while I don't often write code at all these days, when I do, it's invariably in a monospace font, so spaces work as well, if not better, for lining up lines....
 
Last edited:

quikah

Diamond Member
Apr 7, 2003
4,199
743
126
It only matters in those crazy languages that treat whitespace as code (python, are there any others?). WTF, just use braces like a normal language.