by badhombres · 4y ago · 0 comments
Is it because desktop gui is not as supported in modern times and Go is a recent language that is carrying that attitude or is it because Go attracts more web developers in general and they already have web applications as their solution for a gui?
Maybe something else?
The first is organizational. Maintaining a cross-platform GUI library takes a lot of time, effort, and reasonable knowledge of the platforms it targets, so that would need a dedicated team of at least a few people. Which is not impossible, but you need to actually do this. The closest thing to such project seems to be Gio, but I haven't tried it, so I don't know if it's any good.
The second is technological. Most ways of interacting with (native) GUIs involve FFI, and in particular C. And cgo has known limitations and performance issues, to say nothing about the fact that using cgo make cross-compilation significantly harder. So a lot of Go projects tend to just avoid any project that involves cgo.
Again, that's just my opinion as a Go developer.
Interestingly, Rust originally used a similar memory model to Go, but then when they hit this problem decided to take another route.
This has the unfortunate side effect of making most machine learning also not practical in Go.
That said, I'd like to know more about the limitations regarding machine learning. Presumably most machine learning stuff isn't implemented in C?
The language absolutely is a generalpurpose language, and making great GUI libs with it is certainly possible, as shown by Fyne (yes, I know it's still new, give it time).
That being said, most people using Go build server side code and frameworks with it, aka. things that live as daemons in some rack or in a docker swarm. If there is an front-end to these kinds of applications, it's usually web based.