19

Client dev inlined all my single line functions as it's "more efficient".

Speechless is not the word.

Comments
  • 3
    When is this not efficient?
  • 3
    When you are fixing bugs and extending the code.
  • 5
    I suspect, if it's slow week, the entire app will become a single function.

    Quite looking forward to that, if I'm honest.
  • 3
    @platypus oh, I thought you meant, like in C, putting 'inline' before the function signature
  • 4
    No. They literally cut and paste the single line function bodies to the call locations.
  • 5
    @platypus oh my god, that's awful
    What language is this?
  • 1
  • 1
    @j4cobgarby me too, for sometime I couldn't see what's wrong with it
  • 2
    I'm sorry man. The things they teach in school always prioritize any ounce of speed/performance over any and all readability and usability.

    There are people who would write out a solution that takes 10s of lines of code instead of 1 to save on literally nanoseconds of time, or bits of memory.

    In 2018.
  • 4
    This seems like a case of trying to be smarter than the compiler, but in the dumbest way possible :v
  • 4
    I'll get paid to fix it when it all goes wrong, so I'm not sweating it.
  • 2
    > More efficient
    This developer would not understand readability if you gauged preschool scribbles into their eye sockets
  • 0
    @linuswillner It's not just about readability, but removing \n and space characters will do literally nothing for compiled languages.
  • 1
    And also trying to outsmart compilers that have grown smart enough to handle these situations on their own. Thanks, bro.
Add Comment