10

I never understood the ‚space vs tabs‘ war ...
Tabs can do everything that spaces can plus more:
* look the same as spaces, but its width is configurable (at least in a decent editor)
* the safe space (1 byte vs 3 or 4)
* you can decrease the intendation leven with one bsckspace keypress in every(!) editor.

So the winner can only be tabs? Why would I even limit myself with spaces?

I dont wanna start a flame war, just curious what you guys (especially the spaces lovers) think about it

Comments
  • 1
    @DLMousey sorry seems i missed the old posts (new member since a week or so 😅)
  • 3
    @mojo2012 No worries

    Just join @DLMousey at the bar, I heard he was buying rounds.
  • 3
    Just go with language/IDE/company default and move on. The only rule I’d say is never mix within a file.

    Personally I think tabs make more sense, but I use spaces because others do.

    I get far more irked by Visual Studio not allowing me to change the line spacing.
  • 0
    I've never joined in on the tabs vs spaces war, but being a PHP developer (where there isn't a restriction), I just use tabs. If I were Python, I'd have been forced to use spaces by now (although you can configure your IDE to convert tabs to spaces I believe). Maybe in an ideal world we would all use the tab key, but have it entered as 4 spaces for consistency? I have noticed some weird indentation issues on Github after pushing code. That was on a project with multiple developers though.
  • 3
    What if we don't care and use whatever is default ? Oh wait, which way is the bar ?
  • 2
    @Stebner55 That's what people using "spaces" do. You just press tab like anyone else would, but your editor/IDE converts it to n spaces.
  • 2
    You're talking about soft tabs. Feels like tabs, isn't tabs (with the indentation change by backspacing)
  • 2
    So... No flame war. But @DLMousey and some others got drunk, so we got that going for us which is nice.
  • 1
    @mojo2012 I love you ♥️
  • 2
    When you use spaces it doesn't mean you have to put them one by one. lol
  • 0
    I think that what @DLMousey is trying to say is that @mojo2012 is "thicc"
  • 0
    @ckoulatsi if u use an IDE it creates the spaces for u when pressing the tab key. But what if ur using nano or vi?
    Pressing tab once and actually getting that exact character is a huge advantage!
    Also those who prefer two columns indentation can just configure it whereas with spaces its „hardcoded“ by the author ...
  • 0
    @mojo2012 Vi can be configured to indent with spaces.
  • 0
    @sbiewald sure, but alot of editors can‘t. But let‘s not start the war. Spaces is just the „less good“ option from a logical point if view bc it limits you and others. But I do get that some people might just like it bc ... who knows
Add Comment