5 ms·
>Whatever your feelings are about OOP and memory management, the reality is that if you choose GTK, you're forced into interfacing in some way with the GObject
by Lerc 1y ago
>Whatever your feelings are about OOP and memory management, the reality is that if you choose GTK, you're forced into interfacing in some way with the GObject type system. You can't avoid it.
In the past this has also been my assessment of GTK. It lead me to decide to take the other path, to never directly use GTK. I appreciate the value in having a unified user interface between applications, but I have always thought the features that GTK provides were not worth the penalties paid. I have worked around the edges of GTK in open source apps that are GTK based. That lead me to think that GTK and the GObject system is opinionated in a way that are not terribly compatible with my own opinions.
I don't hate that GTK exists, It is my choice not to use it and I am fine with that. However I also have encountered people who seem to think it is not my choice not to use it. There are a million and one other GUI toolkits out there, of which GTK is one of the most polished. I can't shake the feeling that if GTK were less dominant, some of the resources that go to polishing GTK might have been spent polishing a different framework with a nicer underlying architecture.
Of course what I consider nicer might not be what others consider nicer. Of those who use GTK, how many use it begrudgingly, and how many feel like it is the best tool for the job?
- mitchellh 1y ago> That lead me to think that GTK and the GObject system is opinionated in a way that are not terribly compatible with my own opinions. This might be amusing for me to say but... I also feel this way. I disagree a lot with the Gnome ecosystem's point of view. Funny! Using GTK for Linux was a pragmatic choice. A goal of Ghostty is to be "platform-native" (defined here because there's no such thing on Linux: https://ghostty.org/docs/about#native https://ghostty.org/docs/about#native). GTK is by various definitions the most popular, widespread GUI toolkit on Linux that makes your app fit into _most_ ecosystems. So, GTK it is. I hope `libghostty` will give rise to other apprts (maintained by 3rd parties, it's hard enough for me to maintain macOS and GTK) so that you aren't forced into it. See https://ghostty.org/docs/about#libghostty https://ghostty.org/docs/about#libghostty For example Wraith is a Wayland-native Ghostty frontend (no GTK): https://github.com/gabydd/wraith https://github.com/gabydd/wraith Awesome.
- LambdaComplex 1y agoI like Linux because it gives me the freedom to make my system behave how I want. The GNOME devs seem to think that GNOME should only behave how they want. For example, last time I checked, GNOME required a third-party plugin just to move the clock from the center of the status bar to the side. I'm not at all surprised to see that this mindset extends to GTK.
- dismalaf 1y agoWriting Gnome Shell extensions is easy, they're just JS scripts... If you really need to move your clock with a bunch of clicks, there's also KDE which is less opinionated...
- jcastro 1y ago> just to move the clock from the center of the status bar to the side. And I like linux because there are plenty of people who also do not care about this and want to just use their computer.
- const_cast 1y agoYou can "just use" KDE too. The default are actually less insane than gnome, it's easier to use. The idea that more functionality makes software less usable makes no sense to me. No, it's more usable. Its like when people argue that iOS not allowing anything other than safari is a good thing. Okay... how? Because if you like safari, nothing changes for you. You just keep using it. You wouldn't even be able to tell. Similarly, if you like KDE you can just... use it. You don't actually have to change anything. There's no gun to your head. If you're the type of person who just takes software and uses it, then great - you don't need Gnome for that. KDE is actually better at that, IMO.
- hactually 1y agoCan you do that on Windows/mac? Gnome devs not withstanding, you have access to the source to change it if you want or put up a PR?
- cosmic_cheese 1y agoIn my view the primary reason for GTK’s prominence on Linux rides on one thing primarily: it’s got C bindings, and thus it has decent bindings for just about every other language under the sun too. If you’re not trying for anything fancy, these bindings can even be auto-generated. The runner up Qt is much more tightly tied to C++ and Python to its detriment. You really need to meet devs where they’re at instead of insisting that they adopt a particular language to use your UI toolkit. Aside from that, at the end of the day, if you’re building a full fat complex desktop app an old style imperative UI toolkit is probably one of the more practical choices you can make. They have an exhaustive set of battle tested, accessible widgets built in and their pitfalls are well known. Newer approaches expect you to write or import everything and start requiring increased contortions from the developer past a certain point of complexity.
- bobajeff 1y agoActually the auto generated bindings can be attributed to the gobject system. It's a very interesting system, similar DCOM in Windows. Too bad it's so poorly documented. It seems to me like advanced technology left over from a dead civilization, that's being handled by cave people.
- danofsteel32 1y agoGStreamer: https://gstreamer.freedesktop.org/ https://gstreamer.freedesktop.org/ is written in GObject which enabled some great tooling like gst-inspect-1.0: https://gstreamer.freedesktop.org/documentation/tools/gst-inspect.html?gi-language=c https://gstreamer.freedesktop.org/documentation/tools/gst-in...
- cyberax 1y agoAnd it's so flexible that LIGO (the gravitational wave observatory) uses it to analyze the data: https://dcc-llo.ligo.org/public/0168/P2000195/004/ms.pdf https://dcc-llo.ligo.org/public/0168/P2000195/004/ms.pdf
- pjmlp 1y ago
- TheDong 1y ago> It is my choice not to use it and I am fine with that. However I also have encountered people who seem to think it is not my choice not to use it I'm curious what the main opposing opinion you've hit there is? Is it accessibility and non-roman-alphabet input? Those are the things that kinda stand out to me as "gtk does this pretty well, and most developers who hand-roll stuff wouldn't think about it".