• carbon_dated
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      I think some use tabs for indentation and spaces for alignment.

      • Adda
        link
        fedilink
        arrow-up
        3
        ·
        3 years ago

        Yeah, my favourite write-up about this topic is this one. Sadly, it has become normal to use spaces everywhere.

        • carbon_dated
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          3 years ago

          Seems like a good idea, but one thing that worries me is that unless I configure my editor to highlight tabs or to mark them or use a linter, it can be pretty hard to tell if you have been consistent in your use of whitespace (because it can be difficult to distinguish them). Another problem is that for example my code would look awful, if it used tabs instead of spaces for indentation, in editors like notepad that can’t set the tab width (each indent is originally supposed to be 2 spaces wide, because GNU Coding Standards).

          How do most autoindent editors react by default when mixing tabs with spaces? If they break, that would be another problem, because that would mean that contributors would have to create an editor config just to be able to remain consistent with my project’s style guide.

          • Adda
            link
            fedilink
            arrow-up
            3
            ·
            3 years ago

            I must agree with both your points. At least to my knowledge, there are no problems with editors when using both tabs and spaces, but I have not used tabs in a while, so I cannot be sure about it. I still like the idea, but do not use it myself very often (ever) and definitely never when working in a team or working on something that could be viewed and/or edited by others for sure.