• kryptonianCodeMonkey@lemmy.world
    link
    fedilink
    arrow-up
    24
    ·
    edit-2
    11 months ago

    Tabs should be 4 spaces because it can be replaced 1:1 with “tabs”.

    For example…

    def foo():
        if bar:
            foobar()
    

    vs…

    def foo():
    tabsif bar:
    tabstabsfoobar()
    

    Put that in your code review, cowards!

    • ToastedPlanet
      link
      fedilink
      English
      arrow-up
      6
      ·
      11 months ago

      Only if a person’s machine is set to a tab size of four spaces. By this logic, we would need eight spaces for the people with a larger tab size of eight on their machines so they could be 1:1. Minimizing horizontal space is ideal as not everyone has huge horizontal monitor space to work with. But, everyone has infinite vertical space with scrolling.