• SzethFriendOfNimi@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    9 months ago

    I know it’s a joke but I prefer the tab option. It’s easy to convert tabs to any particular spacing or code point width. It can also vary, if wanted, based on terminal or editor type.

    People with worse eyesight can have a wider indentation while those who choose can opt for something more compact

    • fluckx@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      8 months ago

      Honestly I always preferred tabs for indentation and spaces for aligning. It doesn’t break anyone’s experience. And if somebody wants two spaces for a two-space-tab-width for indentation and other people prefer four. That will work just fine.

      I hate seeing 2 space indents. Unreadable AF ( to me ). At least this way I can easily work in the same codebase without somebody being annoyed ( except for the crying about the tabs )

  • Traister101@lemmy.today
    link
    fedilink
    arrow-up
    1
    ·
    9 months ago

    Tabs are objectively the better choice as it allows each dev individually to decide tab width in their editors. Spaces in contrast don’t allow this same flexibility as they are used for much more than simply indentation, for example you likely put a space after each argument or operator IE func(arg1, arg2) or 1 + 2.

    • expr@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

      Code can be viewed in more than just an editor. It might be in a terminal, rendered in a browser, etc. Sometimes you might even have to view it in an environment you don’t control. I am very disinterested in configuring each and every tool to have sensible tabstops, if such a tool can even be configured.

      • Traister101@lemmy.today
        link
        fedilink
        arrow-up
        1
        ·
        9 months ago

        Then don’t? The whole reason nearly all the spaces guys do 4 spaces is cause that’s the nearly universal tab width. You won’t like this but the same exact argument can be made for spaces yet I’d bet you haven’t even once configured the width of those.

        I don’t actually change tab width, it’s the default 4 spaces equivalent for me but just because I don’t take advantage of the ability doesn’t mean I should prevent others from doing so.