Hacker News new | ask | show | jobs
by BenjiWiebe 1605 days 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.