Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ddephor44478yLame 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. -
QCat8048yTabs. 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 -
ddephor44478yUsing 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. -
QCat8048y@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
Related Rants
Tabs or spaces?
undefined
tab
spaces
war