It is SO STUPID that spaces are widely preferred for indentation in code.

For the past, I don’t know, two hours I’ve been trying to fix YAML formatting issues that could have been fixed without any human intervention if only tabs were used. (It’s a big file, hence the duration.) (I know YAML doesn’t support tabs. That’s kind of my point.)

I even reluctantly asked Gemini (forced upon me by work; I was hoping it would change my mind in this case) why anyone would prefer spaces. It said the same irrelevant thing most people say: because some tools don’t support tabs properly.

Know what that sounds like to me? A problem with the fucking tool.

I don’t know if this is the right place to post this, but I can’t think of a better option.

  • HubertManne@piefed.social
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    14 hours ago

    tabs have never been a consistant thing. its basically just a certain amount of spaces. I can totally see why tabs would not be used.

    • andyburke@kbin.earth
      link
      fedilink
      arrow-up
      10
      ·
      10 hours ago

      Exactly, and by design: each user is allowed to set their own tab width and not mess everyone else up.

      Like 8 space tabs? Go for it.

      Want only 2-space indents? Just update your settings.

      The semantic mean of a tab is “indent” - it should be up to each user what their idea of an appropriate indent width is.

        • toynbee@lemmy.worldOP
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          11 hours ago

          Surely, as a human, you can work with me and recognize that the thing about tabs is that they can be adjusted to represent whatever number of spaces you like? The thing about spaces is that two spaces will always be two spaces wide. What benefit does that provide?

          • HubertManne@piefed.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            11 hours ago

            I mean I feel your arguing against yourself here. its more precise to specify using a space or two spaces or three spaces, etc. like in python the formatting is the structure becasue it does not use brackets and such. File formats are exactly like they sound. specific formats. consistancy is paramount.

            • toynbee@lemmy.worldOP
              link
              fedilink
              arrow-up
              3
              ·
              11 hours ago

              I acknowledge that consistency is beneficial, but Python works with both tabs and spaces. The difference, in this context, is that if you like two spaces for indentation, but I like four, your code will always have sections of two when I look at it. I can make configurations that change it and so can you, but why is that needed?

              Meanwhile, in this hypothetical, if we were to use tabs, you could set your tab to represent two spaces and I could set mine to represent four and we’d both be happy with the same, unchanged code.