8

Why is spaces the de-facto over tabs? Tabs seems better in every way including the fact you can make them any width you want...

Comments
  • 3
    It's Tabs for me.

    I like the idea of:

    one key press == satisfactory result.
  • 7
    Vertical alignment.

    Mixing tabs and spaces is heresy, so spaces it is.
  • 4
    I am upvoting the conversation, but tabs are shit.
  • 1
    I just use my linter and let it decide for me
  • 1
    @D-4got10-01 you're kidding, right
  • 0
    @nururururu Why would you think I'm kidding?

    Press Tab once to increase the indentation level, or 4x Space.

    I prefer the Tab.

    But I'd also say that whichever you choose, or even however many spaces you choose, just stay consistent && don't overdo it.
  • 4
    As I understand it, spaces are prefered because they look the same everywhere while tabs are settable and anyone can customize them. And somehow that's an argument for spaces and I don't really get it.

    Objectively speaking tabs are the correct choice and the fact that someone doesn't know how tabs nor computers work shouldnt be a reason for everyone to use them but hey..we also make apps using html/css/js (electron and such) because the same people that prefer spaces need to be able to make apps without learning a proper UI framework and we must oblige them because they seem to be the majority of people. I assume we all had to start renaming branches from master to main because of the same group of people that prefer spaces too. But oh well. Im glad software solved this issue by converting my tabs to spaces automaticaly for these poor noobs. It's just annoying I have to tap backspace 4 times when I want to undo their influence over my default settings
  • 2
    My own poor attempt at explanation aside, the above one is highly detailed && very much on the spot.
  • 2
    I use tabs because they can be customized by team members to fit their preferences. The more familiar the code looks to them, the better for the business. I'm not as concerned about vertical alignment as @Root because we have auto-formatters for every language we use, again, for mental compatibility's sake. Plus, automatic formatting allows an engineer to copy and paste code snippets from anywhere without reformatting things manually

    Vertical alignment and proper formatting is too much of an art & too subjective
  • 3
    It’s also notable how some linuxtards who use the customization card when arguing against macOS prefer non-customizable spaces to customizable tabs. Pick a side!
  • 6
    It's spaces..

    But I still hit the tab key 😂
  • 4
    1. Tabtards argue about customizability but in reality it only looks good for them and inconsistently messy everywhere else (e.g. GitHub defaults to 8, no way to configure it in many other places)
    2. "I OnLy WaNt To PrEsS oNe KeY!!!1!!11” -> practically every editor can insert x spaces when pressing tab
    3. More fine grained indentation with spaces in e.g. multiline comments or strings
  • 5
    I tried switching my projects over to tabs a few times, each time I was sorely reminded that Github uses 8 spaces.
  • 1
    It doesn't matter to the slightest. Your editor should be able to handle both equally well and guess which to use based on other files in the project.
  • 0
    @Root I've used to say tabs for indentation and spaces for alignment but honestly nowadays I view any non-tab-size alignment as a code smell

    Something like this: https://godbolt.org/z/xEqe3fMzE
  • 2
    @devRancid The biggest problem with spaces is that IDEs suck at treating them as one thing. That makes both navigating around with the keyboard and trying to click in between two indents with the mouse very annoying for literally no benefit

    If you want a tab, just use a tab
  • 1
    @cprn yes, but we want to FIGHT ABOUT IT!!!
  • 2
    Every time thhis debate comes up I get the impression thhat there are people who actually thihnk that indenting with spaces means mashing the spacebar until you get thhe righht amount of indentation. We hhave more pressing issues thhan whhat kind of chharacter shhould be written into the file if thhis really is a possibility people consider.
  • 2
    @lorentz whhat the ffukc is wrrong with yooourr keybbaorrd?
  • 2
    @AlgoRythm slightly broken chherry red :(
  • 4
    @lorentz HA, that's surely a "pressing issue"
  • 0
    @lorentz 'slightly broken chherry red'

    Fun. I have the exact same problem.

    Bought my keyboard in 2017, so it is getting somewhat old, though.
  • 1
    @D-4got10-01 Never understood this fascination with mechanical switches. I have my cheap $15 wifi membrane kb+m set from 2010, not a single issue whatsoever (other than key caps missing paint). Whereas everyone around me who has a mechanical keyboard mentions something broke every 2-5 years. Weren't they supposed to be long-lasting?
  • 0
    @cprn Maybe !fascination, but just preference.

    At least on my part.

    For the most part, my keyboard holds up very well for its age.

    So far I had to replace only two keys - Left Shift && Left Control, which just broke due to wear && tear.

    The occasional chattering is / was a fairly recent development.

    It's been a while since the last time this happened to me, but there was a time a few months ago when it had been happening quite often.

    All in all I am satisfied w/ my keyboard.

    It would seem that it is no longer in production, which is a shame.

    I have this model:

    https://amazon.co.uk/Corsair-Mechan... .
  • 1
    @cprn mechanical keyboards are very nice and personally at home I have two keyboards (one clicky, one soft). My personal draw to them is it feels satisfying to type. Switching between them can keep my setup feeling fresh and helps prevent burnout, akin to changing your color theme in your IDE.

    As for how long they last, I’ve had a Razer keyboard I bought with all my birthday money in like 2015 and it is tough as fucking nails. All lights, switches, ports, etc still work perfectly AND none of the keycaps have faded characters. It has lasted long enough to pay for itself and more.

    I go through mice once every six months or so though.
Add Comment