484
got him (lemy.lol)
submitted 7 months ago by ngn@lemy.lol to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] dejected_warp_core@lemmy.world 3 points 7 months ago

Honestly I don't mind the indentation since C isn't going to give us many ways to address this with as little code.

That said, with compilers that are good at inlining trivial functions, I really do appreciate the "it does what it says on the tin" approach to using functions on things like this. Even if they're only used once. Comments would help too.

The logic in these if statements is inscrutable on a cold read like this. To me, that's a maintenance risk; imagine seeing a snippet this size on a PR. Having functions that name what the hell is going on could only help.

this post was submitted on 09 May 2024
484 points (100.0% liked)

Programmer Humor

32731 readers
479 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS