TehPers@beehaw.orgtoProgrammer Humor@lemmy.ml•You need to send an API Request to apply for a job in this companyEnglish
1·
1 year agoIs it just me, or does their sample request use invalid JSON? The keys should be in quotes, comments aren’t in spec (but commonly supported), and trailing commas are invalid as well (but commonly supported).
Adding a single unused function should no effect on runtime performance. The compiler removes dead code during compilation, and there’s no concept at runtime anyway of “creating a function” since it’s just a compile-time construct to group reusable code (generally speaking - yes the pedants will be right when they say functions appear in the compiled output, to some extent).
Anyway, this can all be tested on Godbolt anyway if you want to verify yourself. Make a function with and without a nested unused function and check the output.