2 ms·
Gtk is C, but it's introspected in a way that it generates really good bindings for other languages. gtkmm and gtk-rs are really good. Qt is C++ through and th
by BearOso 4y ago
Gtk is C, but it's introspected in a way that it generates really good bindings for other languages. gtkmm and gtk-rs are really good.
Qt is C++ through and through. Even more so because of its MOC. It's really hard to port to other languages.
If we wanted a standard toolkit for Linux, it'd have to be written C to be compatible with most FFIs. The problem with Gtk is it's in coalition with Gnome, and its developers shun anything not fitting that scope.
- sho_hn 4y ago> Even more so because of its MOC. Ho-humm, I'd argue that specific point. The meta-object system adds introspection and reflection, and helps it get e.g. fantastic Python bindings. Various other bindings are also basically built around wrapping QObject+QMetaObject. Yes, binding Qt is anyway harder than GTK's C API. But not because of the MOC.
- BearOso 4y agoThat's an interesting point. I hadn't thought about the MOC helping introspection.
- cglong 4y agoHaving never written using any of these technologies, I was wondering how ergonomic GTK would be in Rust. Isn't GTK very object-oriented in its design?
- zorr 4y agoCheck out the gtk-rs project which provides the Rust bindings.