Tabs versus Spaces

tabs
spaces
formatting
code
good

(oaktree) #1

So. Silicon Valley’s s3e6 aired last night… One of the big themes of the episode was the ongoing war between Tabs and Spaces.

I wanted to know what you guys think.

  • Tabs
  • Spaces

0 voters

Personally, I’m a Tab guy. A Tab means that you go in one scope. You can set a tab to be whatever you want (i.e., 2-space offset; 4-space; 8-space; etc.). Then, other people can say “I want a TAB to mean this,” but they still use a TAB. This way, you get to code with your column offset; others with theirs.

Here’s article on the subject, albeit a dissenting one.


#2

Tabs = 4 spaces is what i use

It’s just so much quicker than using spaces and means that your spacing is always going to be consistent with little effort on your part.


(oaktree) #3

Same. 4-space offset is the best!


(Command-Line Ninja) #4

I completely agree with this. Although Linus Torvald’s insists on 8 spaces for a tab. That’s the coding convention for the Linux kernel.


(Ne0_) #5

4-space tab. What else? :wink:


#6

8 spaces!? Sounds like it would make for a lot of horizontal scrolling


(Ne0_) #7

I actually coded Python in nano with 8-space-tabs for a time. For short scripts it isn’t that bad. But once you start building bigger projects with loops in loops and exception-handling in the inner loop and probably some if-else in there too - you really want to reduce that space :grinning:


(oaktree) #8

Yeah, believe me. Eight spaces makes for hell.


(oaktree) #9

This topic was automatically closed after 30 days. New replies are no longer allowed.