• calcopiritus@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 month 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
      2
      arrow-down
      1
      ·
      1 month 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?