27

Why do people use spaces over tabs?
Tabs are awesome.

Comments
  • 12
    Because sometimes different editors display tabs differently or different people have their tabs set to different sizes. Spaces are consistent throughout
  • 0
    I don't really mind the slight difference in "tab sizes", as long as the code is readable
  • 0
    @csessh good thing I don't code in Python then ! 😉
    I do make sure I'm consistent tho and since I've only worked alone it hasn't been a problem for me yet
  • 0
    If you work alone you can avoid indentation completely. The debate is about communication with other people.
  • 3
    Except that people who usually use spaces do this...

    if (var){
    var foo = true;
    var bar = false;
    var steve = false;
    }
  • 5
    Set IDE to use 4 spaces for tab! Done!
  • 0
    Both work fine until you mix them.
  • 0
    @farmerhands you are talking about the key, right? Because the visual width of tab is 8, according to the standard (and Python compilers)
  • 2
    @csessh Yes, I don't like them mixed together
  • 0
    All the code editors i use maps the tab button to 4 spaces. They also make sure that the lines always start at the correct indentation.

    So I can just press tab once and get the benefit of space. I don't even see why this is still an issue being argued over.
  • 0
    who else saw the episode of silicon valley where Richard dumps a girl coz she uses spaces over tabs and prefers vim over Emacs 😂😂
  • 0
    I honestly didn't know this was a point of contention until I joined devRant.
  • 0
    use tab or space depends whether you are overweight or underweight.
    if u want to loss weight, hit space 4 time or may be 10 n drink 1 cup coffee. if u want to gain, 4 cups of coffee or 10 n 1 tab.
Add Comment