Hi,
Just wanted to share a link to a book: Object-Oriented Programming With ANSI-C (Axel-Tobias Schreiner)
The first edition of the book has been written before the creation of GTK, in the early 90’s. (So after C89, thankfully).
I think it is a good source of inspiration, or at least to better understand how to do OOP in C. (I’ve just started to read it, not finished it yet).
This post is related to Emmanuele’s recent blog post: The Mirror
When rethinking how to do OOP in C, seeing other approaches can be useful. But maybe GtkObject/GObject was already inspired by OOC, I don’t know. And OOC apparently doesn’t take into account language bindings, which is an important part of GObject. But OOC uses code generation tools, to regain static type checking instead of using void*
a bit everywhere.
So, that’s it. BTW I think Emmanuele’s ideas are good ideas.
Good weekend,
Sébastien