4
Velitar
8y

Tabs or spaces?

Comments
  • 5
    Tabs (4 spaces)
  • 3
    😴
  • 0
  • 0
    2 space width, other is preference.
  • 0
    Lame question, Episode 8196, but I'll jump in.

    It's a question of style, so it can be nothing but spaces.
    However, in real life it depends on the project style guide, so usually you don't have a choice

    But who cares, a decent editor will take care of that, so you don't have to think about such trivial things. And for anything else Astyle or M-x whitespace-cleanup will fix it.
  • 0
    @ddephor OMG SPACES!!!!!
  • 0
    Tabs. 4 characters wide.
    Main reason is MAKEFILES OMG.

    THE IDIOT THAT REPLACED THE TABS IN MY MAKEFILES BY A RANDOM AMOUNT OF SPACES IS GONNA DIE.

    Sorry, old trauma
  • 1
    Using tabs for indentation is pointless. Files don't carry information about the intended length for a tab, so the indentation is ruined with any other length setting. There is absolutely no good reason to use tabs. Only spaces ensure a definite and proper indentation.

    The concept of makefiles forcing you to use tabs is pure madness, just like the indentation as part of the syntax in python. Indentation is not the responsibility of a language. That is something I could rant about for hours, everytime I'm building makefiles or write python code.
  • 0
    @ddephor I agree with you. I use tabs everywhere because of makefiles, and because primitive IDE would delete tabs and space the same, making spaces costly in time. Tabulation where a hack of tables display to make code easier to read, but this should be software based, not hardware.

    However, since they hold no information about how much indented stuff will be, they make code easier to custom: nothing to be done, managed by display.

    So... It doesn't makes sense, software should help customize each code to fit its reader, it doesn't, do whatever you want, but TABS for makefiles
Add Comment