34
Sauruz
4y

U fokkin wot m8?!?

Comments
  • 4
    Well I mean they're not wrong... Dicks, sure, but not wrong per say...
  • 9
    Most ides and editors I use add 4 spaces automatically when I press tab
  • 6
    but seriously, I prefer tabs so every developer can set the width for his own without affecting the others...
  • 4
    @olirz the whole point of avoiding to use tabs is that many developers use additional spaces to line up arguments and such in a visually pleasing manner.

    So let's say your IDE is set to tab = 4 spaces, and then you add another three spaces to make the word line up with the word on the line above.
    Now you open the file in a different editor and wouldn't you know, nothing lines up anymore.

    This is why it's often recommended to always use spaces. No exceptions.
  • 1
    @ElectricCoffee Yes, but: aren't tabs meant to line things out? Your cursor 'jumps' to the next fixed horizontal point... If anything, tabs are invented to line things out. And if everyone only uses tabs, the tab width doesn't matter...
  • 2
    @Lukas That would be great if tab width is much bigger than the text width. Unfortunately, tab width in code is maximum 8 characters and many variables/function names can be much longer than that. In those cases you will use less tab keystrokes, but exactly "how many" depends on your tab width. another user will have a different tab width and will see things differently.
  • 1
    Tab with 2 spaces
  • 4
    I don't know why people still argue on this. All recommendations I have read says spaces is the way to go. Unless you're a wordpress developer. But we all know that's shit right?
  • 3
    This thread made me die laughing. Wife asked me what's so funny. I explain "You know the tabs vs. spaces debacle on Silicon Valley, yeah... I'm reading an argument about that." She just doesn't get it.
Add Comment