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

    This is literally a getter function. How is a getter awful code? It’s the simplest function there is. The only function simpler than that is returning the input itself.

    • BrianTheeBiscuiteer@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      3 months ago

      How does “foo” mean “get”? Half the battle of writing correct code is writing code that’s easy to interpret. Do you always look at the guts of every function you’re about to use?