I’ll probably stick with Fyne for the time being. It’s fine.
complain to Apple which makes it illegal to have access to the Cocoa API if you don't own a Mac
Libui works on multiple platforms with native UI. QT, GTK and Fyne work around this each in their own way. Fyne is a very interesting solution as it just renders everything in OpenGL.
At first I didn’t like Fyne but from a visual standpoint but after switching to the light theme it has really grown on me. And the cross platform bugs I used to get with libui are pretty much non existent. It is so much simpler to support one rendering engine that all of the platforms support vs multiple implementations of the same thing. It might work for simple apps but the platform specific quirks start adding up and it becomes a maintenance headache. After switching to Fyne I’ve been very happy.
Based on this line from the README, and the fact that the Cocoa screenshots are from Linux, I'd guess the author doesn't have a Mac:
>If you can either test on Macs, or provide build systems, please contact us.
[0]: https://gioui.org/
Can anyone explain why this is the case? Are there any obvious reasons why Apple and Google haven't adopted it for mobile apps?
Google and Apple haven't adopted it as they were already developing languages/platforms targeting GUI development (Dart/Flutter and Swift respectively). Also Go is a young language targeting a different niche so there was nothing pushing it this way.
Go was created as an improvement on C/C++ with faster compile times, mostly-safe memory management, easy threading implementations and cross-platform.
Usually, it'll be used in networking applications, but nothing keeps you from using Go in GUI apps.
> Are there any obvious reasons why Apple and Google haven't adopted it for mobile apps?
Android already has an incredible platform running on the JVM with years of work to optimize and create dev-friendly APIs. You could build a compiler that compiles Go running on the JVM and use Android APIs if you really hate Java.
A lot of GUI apps now use Electron, which is easy for web frontend devs to pick up and run. Plus you can use web frameworks like React, etc to run them. The major deficit here is that it uses a ton of memory for nothing, but hopefully frameworks like Flutter will come in and take their place.
Compare SwiftUI’s way of writing a static UI view to Goey’s: https://www.objc.io/blog/2019/11/05/static-types-in-swiftui/
The two layouts are very similar. I’m a Professional Go Programmer, but I find the Swift example (and similar Flutter examples) much more suited to describing interfaces.
For assets, I use go-bindata to embed them into my binary, personally.
The approach is a hybrid. The declarative approach with reconcilation (tree diffing) comes from React. The automatic layout with constraints does come from Flutter.
I personally like that kind of syntax for UI development.
https://groovy-lang.org/swing.html
Really, most of the stuff people think it is new in Flutter, it really isn't.
Is it just by accident?
Golang projects like to have a play on words with “go” or just prefixed like “go-commander”. Such as Hugo static site generator, the mascot gopher, Gorilla web toolkit...
Anyway still fyne looks like another good option