And so I’ve placed a bet on Go. It is just as conceptually simple as C, sports a friendly BSD-style license, and already has its own parallel ecosystem. No stinky LLVM, in fact no traces of C at all! It’s an overlooked revolution! I can follow symbols through packages however deep I want to and I always end up in Go or its assembly. Well, so long as nothing ugly uses Cgo.
Right, now that I’ve embraced the garbage collector, how do I make an interface that doesn’t look like it dates back to the ’80s? And can I avoid Cgo?
Tried this once in python, for shits and giggles. What would a pure python X11 toolkit look like…
Well, it turns out libxcb is dynamically generated from a protocol definition file. Which means you don’t need C at all really. You can take those protocol and generate your own basic API from it. And that API is as current as the protocol files making maintenance somewhat easy.
Then you just need to make, or borrow an event loop (Python’s asynchio event loop is a suitable thing to steal), and implement some widgets and things so you aren’t drawing with primitives.
Doing this in other languages should be suitably easy as well. And the article talks about using xgb, which is out of date. Perhaps xgb needs to be rewritten to auto-generate the code from the protocol (I know very little about go, YMMV).