this post was submitted on 19 Jun 2025
92 points (86.5% liked)

Programmer Humor

37249 readers
6 users here now

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

Rules:

founded 6 years ago
MODERATORS
 

Made with KolourPaint and screenshots from Kate (with the GitHub theme).

you are viewing a single comment's thread
view the rest of the comments
[โ€“] barubary@infosec.exchange 1 points 4 weeks ago (1 children)

To be fair, the C example could be detangled a lot by introducing a typedef:

typedef int Callback_t(int, int);Callback_t *(*fp)(Callback_t *, int);
[โ€“] sph@lemmy.world 2 points 4 weeks ago* (last edited 4 weeks ago)

True, but that requires writing an additional definition and hides the parameter types, which can be very interesting, and you'd need a typedef for every new param combination I guess. It feels like a solution for a problem that could have been avoided by a better signature style in the first place.