• InFerNo@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    Make the input variables nullable, then add checks if the values are null, then assign default values if they are, otherwise continue with the passed values.

    • Acters@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      Good idea but not feasible as that could introduce unknowns. Unfortunately making defaults when null is counterproductive as we are looking to increase LOC without introducing odd behavior and having no changes to how the overall function works. The only objective is to increase LOC.