this post was submitted on 09 May 2024
455 points (92.4% liked)

Programmer Humor

32472 readers
900 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] dejected_warp_core@lemmy.world 3 points 6 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.