A few comments on the GUI space for Go (as a co-author of one:
https://cogentcore.org):
* It is maybe not so hard these days to write a GUI framework that kinda works, but there are some really important design choices that make a huge difference in actually using it, especially when you want to do something different than what is already supported.
* The most important issue (IMO) is how you support dynamic updating of widget structure. We spent a long time on that. This new go-gui does not appear to support anything of that nature, at least according an admittedly very superficial look at the example code: just a bunch of declarative structure initializations. Here's an extended discussion of this issue:
https://github.com/cogentcore/core/discussions/961
* As this updating issue shows, there are a lot of basic tradeoffs in the GUI design space, that align to some extent with immediate-mode vs. retained-mode. So probably there won't be a one-size-fits-all solution in the world of GUIs.
* However, there is a very long tail in all the details in this space (cross-platform, edge cases, advanced features, internationalization, accessibility, etc), so logically it really doesn't make sense in terms of resource allocation to have a broad proliferation of half-baked frameworks -- it would be much better to have a small number of really solid, mature frameworks.
* Furthermore, when an end-user commits to using a GUI for their app, that represents a HUGE investment in the future viability of the framework. Nobody wants to invest their time coding in something that will soon become abandonware.
* Therefore, from a "rational" perspective, it really would benefit the Go community the most to somehow have an organized, collaborative investment in a few major frameworks, that then develop a sufficiently strong user-base and community to make it worth it for someone to actually use the framework in their own apps.
* In an apparently unrealistically ideal world, Google would actually invest in supporting such an effort, to develop something with serious institutional and official support. I guess that ship has sailed, and it is called Flutter, written in DART, not Go.
* At this point, it seems that Fyne clearly takes the lead in breadth of user-base and support, while Gio may have gone the furthest toward tackling the long tail of issues, at least cross-platform. Furthermore, these two reasonably represent the retained-mode vs. immediate mode approach. So, far, so good.
* However, the reason I didn't just follow the above logic and just use Fyne (I prefer the retained-mode design -- I'm way too lazy to deal with all the code you have to write for Gio and immediate-mode frameworks), is that I found it to be sufficiently problematic in a number design choices, and at the time, lacking in a number features. I think many people find it to be "fine" for most uses, but it is just unfortunate that this most popular and well-supported framework (for which the developers absolutely deserve a huge amount of credit and congratulations!) is perhaps not quite as elegant and powerful as the language in which it is written.
* Anyway, I'm afraid CogentCore is now limping along in a quasi-abandonware state because its main developer went off to college and reasonably has other priorities, and I do not have sufficient bandwidth to do anything other than make it work for my needs. So I'm just as guilty as anyone else of "polluting" the space with half-baked projects! (although, CogentCore is already highly functional, but definitely has its fair share of long-tail issues...)
* So, in conclusion, there is perhaps a clear sense of what would be ideal, and we all love Go so much that we would love to have some really great options for GUI frameworks, but given the real-world constraints on time, effort, motivation, money, history, etc, it is unlikely that anything more ideal will happen. That said, I'd certainly be willing to contribute whatever lessons I've learned in developing CogentCore, if anyone wanted to organize some more collaborative effort going forward.
- Randy
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
golang-nuts...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/golang-nuts/aiAH5MrLhLCZCpWt%40toolbx.