• @[email protected]
    link
    fedilink
    English
    1510 months ago

    I consider tabs for indentation a failed concept.

    The idea is good, but it evidently failed. Most guidelines and newer Tools recommend or require or use spaces for indent. They have their reasons too.

    The prevalence of spaces makes it hard to make a contrary argument for tabs. By now, I don’t think it’s worth even if it had reasonable advantages.

    Editors/IDEs that parse syntax can adjust space indent too. A mixture for indent and alignment is not obvious for everyone (I always display whitespace in my editors and am deliberate and consistent, but many people and editor defaults won’t be). Some defaults of four or eight space-width tab display is atrociously wasteful and inaccessible.

    Spaces are a good enough baseline. It works well enough. And most importantly it works consistently. That’s why it won in prevalence and use.

    • xep
      link
      fedilink
      610 months ago

      If I could only get everyone who works on the thing I work on to use a whitespace visualizer, it would be enough. We can fight about tabs or spaces after we get rid of all the unnecessary trailing ones.

    • @[email protected]
      link
      fedilink
      210 months ago

      It works well enough

      is an argument that works for you because you have somewhat healthy eyesight (not counting common glasses).

      It “won” because the majority of healthy people has no problem marginalizing minorities with disabilities.

      • @[email protected]
        link
        fedilink
        English
        4
        edit-2
        10 months ago

        Do you have actual experience with it?

        Some time ago I read a comment from someone with impaired eyesight who used an editor that would adjust space indent just fine.

        Accessibility is a thing I always consider.

        • @[email protected]
          link
          fedilink
          710 months ago

          Not personally, but I had a co-worker once who had an eye condition that made him extremely short sighted to the point where glasses could not fully correct it. He walked around in public using a stick for safety.

          For his work, this meant he had to apply an extremely large front sizes. Since out code base was space indented, in nested places this would result in almost half his screen being blank on the left side because of the space taken to render blanks.

          Sure, we could have just stood out ground and let him solve his own problems somehow. Instead, we made one change to the editorconfig, ran the formatter for a second, he set his tab width to 1 and the world was marginally better for him in less time than it takes me to tipe this text on my phone.

          • @[email protected]
            link
            fedilink
            English
            1
            edit-2
            10 months ago

            I would have preferred tabs to win for this reason.

            Unfortunately, as you pointed out, “good enough” can be excluding, non-inclusive. Overall it works well enough for enough people / none with impairment stumbled over it yet, did not voice or were not heard.

            the majority of healthy people has no problem marginalizing minorities with disabilities

            I wouldn’t attribute malice like this though. Most people just don’t care or are not mindful and thorough.