3 ms·
Well, yeah, obviously there's less redundancy, but I'm specifically not seeing the advantage that OP mentioned. (Which is all that I'm questioning.)
by lomnakkus 10y ago
Well, yeah, obviously there's less redundancy, but I'm specifically not seeing the advantage that OP mentioned. (Which is all that I'm questioning.)
- loeg 10y agoHere's an example: typedef void (*sighandler_t)(int); sighandler_t signal(int signum, sighandler_t handler); Without the typedef, it's much less clear. Edit: It could instead be written as the non-pointer type: typedef void (sighandler_t)(int); And then used as: sighandler_t *signal(int signum, sighandler_t *handler); And as a function declaration: sighandler_t foo; With the pointer in the typedef, the type can't be used to declare functions.