3 ms·
Why would you put function pointers in structs? The function still needs to be handed the struct when called (no 'this'), and every time you instantiate the str
by BenjiWiebe 5y ago
Why would you put function pointers in structs? The function still needs to be handed the struct when called (no 'this'), and every time you instantiate the struct you need to set the function pointers to the correct thing again.
It gains you approximately nothing, as far as I can tell.