What if those who’ve been defending the use of tabs over spaces realized they’re actually using soft tabs (spaces behind the scenes) after all? 🤔🤔🤔

  • 6
    spaces > tabs
  • 11
    Well I use the tab key but have the editor configured to inject spaces.

    Together with smart indent it makes writing code that still look nice in any editor easy.
  • 5
    @nikolatesla Technically spaces are always greater than tabs. Because there are more of them for the same function. Spaces represent!

    Also, tabs are always defined in terms of spaces. So spaces and tabs kinda form a whitespace currency where people are angry about the exchange rate acceptance of certain denominations. Imagine same arguments about pennies vs nickles.
  • 2
    @Voxera and that's the proper way of doing things
  • 0
    I like the auto-detect feature that switches whenever a document uses spaces or tabs. But it drives me up a wall whenever I have to fight it to use tab in a brand new document rather than spaces.
  • 0
    Tabs for lexical block indent, spaces for alignment.

    This is the true way.
  • 0
    Yeah, I just love it when an IDE puts in 4 spaces instead of my tab, so when I change my mind or made a mistake I now have to press backspace 4 times instead of once and from time to time when I accidentally miss one backspace the line is misaligned and I have to go back and fix it! Not a waste of time at all!

    Seriously though, that's just a pet peeve of mine, otherwise soft tabs are great and preserve formatting. They are the only compromise between tab/space users that works and if the IDE is good It's seemless
  • 3
    @Hazarth I just use a code formatter to keep the same visuals throughout all projectfiles. Like black or yapf for Python, astyle or clang formatter for C++ and so on.
  • 3
    @Hazarth shift-tab, my friend, shift-tab.
  • 0
    @iiii pfft, what is this? A word processor? I want my single char tabs! Works great on vim or nano!
  • 0
    @Hazarth if it does a tab replacement then it is aware of an indentation concept and most probably has that binding.
  • 0
    @iiii ah well, if we want to talk seriously then Id have to say that it just sounds like tabs with extra steps... Which then begs the question, why would I want the extra steps? The only reason Im ok with soft-tabs is because for some reason It's forced by most IDEs by default and that made it into an industry standard, which means if I wanted tabs Id ruin the codebase...

    However you can bet your ass Im using tabs wherever I can on my personal projects!
  • 0
    Imagine actually pressing the spacebar 2-4 times after writing a line of code 😂😂😂
  • 0
    There is no such thing as soft tab. There is tab the keyboard key and tab the character.

    It's people that don't understand how a tab character works that think spaces > tabs. In fact that is how this whole tab key produces spaces bullshit was invented.

    Using spaces for alignment is as stupid as embedding font or colour in the code. I for example hate 2 space indent width. If we used tab characters I could just set my editor to display 4.

    Fucking spaced out motions.
  • 0
    @Demolishun I agree on the first part disagree on the second. Spaces are a waist of space as they require up to 4 times the about of bytes per indent.

    As for the exchange part: The functionally is different it's the same reason we don't use <b> and <i> tags anymore they are visuals used in structure so it should be in css. The tab width is a visual that should not be present in the structure.
Add Comment