4 ms·
If everyone had rolled its own OOP in C now we would have dozens of incompatible and hard to interoperate object systems, all trying to do in a library the same
by qalmakka 6y ago
If everyone had rolled its own OOP in C now we would have dozens of incompatible and hard to interoperate object systems, all trying to do in a library the same stuff C++ and Objective C do at compiler level. I understand doing simple IsA relations with casts, or using function pointers for virtual dispatching, because they are sane and clean. These guys basically implemented reflection and duck typing in C.
I think it's one thing to wrap that sort of thing inside your program; it's after all your project and you can do whatever you deem appropriate to make it work.
Using such a concoction in a library is kind of demanding everyone to deal with the mess you made if they wish to interact with your code, and it's a pretty different thing, IMHO.
GObject is very far from the beauty and simplicity of C that every one knows and love. It's also arguably vastly clunkier and uglier that Objective C or C++ are.