3 ms·
I don't see how function pointers are any harder to manage than an enum. Just slap those function pointers into an array or a switch, and away you go.
by delusional 6y ago
I don't see how function pointers are any harder to manage than an enum. Just slap those function pointers into an array or a switch, and away you go.
- whatshisface 6y agoEnum values are type checked based on the sum type you define them with. Function pointers are type checked based only on their signature. Also, C does not support partial application, but it does support partially filling out a struct of enum types.