Every solution feels great and neat in the beginning until you wake up one day and feel sick to your stomach from the mess it has created.
Most vtable like implementations in the kernel are nothing more than struct of function pointers, and this is almost exclusively.
As nostrademons pointed out above (https://news.ycombinator.com/item?id=10261375), if you feel that some tool you've used has created mess (so that you even feel sick to your stomach), it's most likely not because the tool is bad, but because you've used it in inappropriate way.
Re:Object-oriented techniques in C
by deathanatos on Wednesday September 23, 2015 @02:33AM
(#10263603)
As an example, SDL is a large C codebase that employs a very OO paradigm, and I find its APIs very well organized.
When I was (or am) coding C, a lot of the OO principles helped me write better C code, as I understood better what the higher level constructs that I was working with was. (i.e., if there's a base class among essentially hiding among my structs that should perhaps be pulled out into a separate struct; do I need a vtable, or perhaps function pointers on the struct; how is a struct initialized, and how is it destructed, etc.)
By the way, similar approach is used across the Linux Kernel: check, for example, the book "Linux Kernel Development" by Robert Love, especially the discussion on the virtual filesystem.