News for hackers. Stuff that matters.
Re:GTK4 Bindings for Common Lisp by tabtab on Tuesday September 20, 2022 @02:20PM (#32915785)
It's not good D.R.Y. to reinvent a binding library for each and every application language. What's needed is a state-ful GUI markup standard. Then any language that can emit and read XML can use the GUI kit/browser/component, no binders needed.
Re:GTK4 Bindings for Common Lisp by Spivak on Tuesday September 20, 2022 @03:28PM (#32916615)
What you're describing is GObject inspection. It's literally a series of XML documents that can be used to autogenerate ffi bindings in any language. The future is now.
Re:GTK4 Bindings for Common Lisp by nerdponx on Wednesday September 21, 2022 @01:55PM (#32928724)
...which is literally what these Lisp bindings use.
Re:GTK4 Bindings for Common Lisp by pavon on Tuesday September 20, 2022 @05:01PM (#32917753)
No one will want to write GUI code that directly parses and generates XML, so every language will end up putting wrappers around that, and you are back to where you started with an expensive translation layer in-between.

Having a machine format that describes the interface and facilitates auto-generating the bindings, like GObject introspection is a better option and exists today. Even then the auto-generator will need to be custom for each language, to handle integration with the language's standard library data structures, memory management and the like.

Re:GTK4 Bindings for Common Lisp by carapace on Tuesday September 20, 2022 @09:06PM (#32919803)
> XML User Interface Language is a user interface markup language developed by Mozilla. XUL is an XML dialect for writing graphical user interfaces, enabling developers to write user interface elements in a manner similar to web pages.

https://en.wikipedia.org/wiki/Xul

Re:GTK4 Bindings for Common Lisp by JasonFruit on Tuesday September 20, 2022 @02:38PM (#32916024)
That way, your language can use any toolkit, such as WebKit or Gecko.
Re:GTK4 Bindings for Common Lisp by spicybright on Tuesday September 20, 2022 @04:26PM (#32917326)
If you did that, you limit what the API of a framework can do, you either can't use ones that fall outside that spec, or you have to jump through hacky hoops to get it working.

Experienced engineers know D.R.Y. has it's uses, but isn't a good hill to die on.

Re:GTK4 Bindings for Common Lisp by 13415 on Tuesday September 20, 2022 @02:22PM (#32915805)
What's the advantage? This merely seems to add another layer of abstraction.
Re:GTK4 Bindings for Common Lisp by bmitc on Wednesday September 21, 2022 @01:36AM (#32921161)
I'm not sure DRY applies across language boundaries. If a binding exists in one language, creating a binding in another isn't really repeating anything.