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
-
@Krokoklemme well not really lesser keystrokes, everyone uses auto indenter, some of them use tabs, some use spaces, some even let you choose
-
31415097yI always use spaces for indenting. The amount varies, but it is usually some random prime number, except during the summer and winter solstice. During those, the number of spaces is mostly determined by some ritualistic sacrifice (mostly humans, sometimes other animals).
I only use tabs for line breaking. -
heikomat6877ySpaces are rendered basically the same everywhere, tabs are not. Tabs are rendered as 8 (!!) Spaces on github! I want my code to be on the page, not on the fucking moon. There is no actual benefit to using tabs, while spaces have the aforementioned benefit of consistency
-
@heikomat tabs have the benefit of flexibility
And I don't know how you messed it up, but tabs are 4 spaces wide for me on github -
atulmy2697yIsn't it the same on newer IDEs? Tab just act as a shortcut for either 2 or 4 spaces of indentation which are of course configurable.
-
Will they ever come to an conclusion? Will the smaller file size or the homogenous code indentation win? Stay tune for next weeks episode where we tackle the old question: Vanilla or Chocolate? That and more next time on "Useless Arguments".
-
Bikonja23867y@heikomat you got it inverted, spaces are inconsistent because you can put a different amount of spaces, but you always put the same amount of tabs. Tab is, by definition, an alignment character meaning it's supposed to align your code to the same indentation (of your choosing normally). These days, IDEs do "magic" and it's pretty much irrelevant whether it's a tab or space, other than for the file size (everything else is "magically" equalised by parsing both as an abstract indentation character pretty much the same as tab).
However, doing that is like using a hammer to open beer. Sure, you can do it, even if it's not as convenient as an actual bottle opener, but why would you use a hammer if a bottle opener is right next to it? -
heikomat6877y@Bikonja i like the way you argue, and you have good points. The tab is technically the correct tool to represent alignment, but at the end of the day, the space seems to work ever so slightly better for what I do than the tab does. And I prefer the wrong tool over the correct tool, if it works better than the correct one.
And so far I've had zero problems working with spaces, but I did encounter the github-problem I mentioned when dealing with tabs. -
Bikonja23867y@heikomat I have no problem with people who like using the wrong tool. If it works for you, that's fine. I do have a problem with people who insist that the wrong tool is the right tool, that's why the tabs vs spaces debate riles me up so much; most people swear that space is the correct tool which pisses me off to no end. Use a fucking emoji for indentation if you want as long as you don't pester me how it's better and it doesn't inconvenience me.
Friend: "I use spaces to indent"
Every self respecting programmer: "I think we can no longer be friends"
undefined