• spartanatreyu@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    There isn’t a debate anymore, the points have already been stated.

    The only reason people still talk about it is that there’s always developers learning the points for the first time.

    Don’t worry about your own eyes in some vague future, worry about other’s eyes now.

    • CameronDev@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I think the reason that people still talk about it is that there isn’t a compelling reason on either side. There is just a series of slight benefits and drawbacks. Tabs are slightly better on braille readers, spaces are easier for consistency (when tools don’t respect .editorconfig), blah blah blah. No one is being entirely excluded due to either option being used, so it’s really a personal/team style decision.

      • spartanatreyu@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Tabs are better than just for blind users.

        Most users want an indentation size of 4 so for the rest of this comment we’ll just call that one the default size.

        Tabs

        Tabs at default/any size

        • Blind people don’t care about the tab size, just that there’s tabs.
        • Keyboard users don’t care about the tab size, just that there’s tabs (because it’s only one key to change indentation levels).
        • Manual formatters don’t care about tab size, just that there’s tabs (because you can’t mess anything up inside the tab itself, but you can with space indentation)

        Tabs at larger than default size

        • Verbose language (e.g. FactoryFactoryFactory) users tend to care about tab size and put the tab size up to 8 to make it easier to read. These users tend to use tabs because it’s fewer keys.
        • Zen mode users (AKA visual overload users) tend to use larger tab sizes

        Tabs at smaller than default size

        • Users with poorer vision who increase the size of the code while trying to fit as much on the display as possible

        Tabs at variable sizes

        • Users who move their code between a laptop display and a larger display
        • Users who use terminal splitting / tiling window managers (as a code viewport becomes more squashed, the indentation adjusts to fit the same amount of code in the viewport)

        Spaces

        Spaced indentation at smaller than default size

        • Users are unaware of reasons why to use tabs
        • Users coding in C99 on an 80 character wide shell

        Spaced indentation at default size

        • Working on a project or using a style guide created by developers who originally coded in C99 on an 80 character wide shell

        Mixed Indentations