2 ms·
> TIL, apparently all that gobject code attempting to add something resembling a type system to C in glib is redundant... GLib adds an object system, not a typ
by masklinn 4y ago
> TIL, apparently all that gobject code attempting to add something resembling a type system to C in glib is redundant...
GLib adds an object system, not a type system.
Not that C's type system is a great one, but GLib does not fundamentally change or add to it (though it aliases it, a lot, for reasons I never understood).
- pengaru 4y ago> GLib adds an object system, not a type system. In service of GObject, glib implements GType, and GLib's goals necessitated adding a (dynamic) type system to C: https://docs.gtk.org/gobject/concepts.html#the-glib-dynamic-type-system https://docs.gtk.org/gobject/concepts.html#the-glib-dynamic-... We've had literally decades of glib-utilizing free software developers mocking C devs reinventing their own bespoke type systems (and/or object systems) in their projects in lieu of simply adopting glib. It most definitely adds a type system, at least as much as one could manage something called that in C. It just doesn't end there, and obviously your object system will dovetail with your type system.