LWN.net Logo

XDC2012: Programming languages for X application development

XDC2012: Programming languages for X application development

Posted Oct 8, 2012 5:46 UTC (Mon) by magnus (subscriber, #34778)
In reply to: XDC2012: Programming languages for X application development by cmccabe
Parent article: XDC2012: Programming languages for X application development

The problem with most of these language bindings for GTK etc is that they are "shallow", just hooks allowing you to call into the C library. That's not adequate.

For example GTK/Glib has it's own object hierarchy, main loop, linked list handling, thread handling, reference counting and so on. All this should blend into the binded language so you shouldn't have to cast/convert things between your application code and the library, it should just work as if it was native. I don't know how many languages support that kind of deep library embedding.

For the GUI builder problem, say for example say you want to write a custom widget in Go (or whatever language you've chosen) and use that in the GUI builder. Can you do that? What happens when you need to debug the program, will you be able to do that cleanly in the high-level language or will you need to single-step through autogenerated junk? And so on...


(Log in to post comments)

XDC2012: Programming languages for X application development

Posted Oct 8, 2012 8:38 UTC (Mon) by ortalo (subscriber, #4654) [Link]

I have the feeling too, like you, that such bindings are not convenient enough.

But then, maybe it implies that the toolkit library itself should be written in a different language (hence pushing the language/{C,C++} frontier inside the toolkit and under the responsability of the {Gnome,Qt} project). Application developpers would lose some choice (but that's the objective after all).
However, in this case, the choice of the implementation language is critical and, given the number of available alternatives and the current domination of {C,C++}, it is pretty easy to predict an enormous resistance to change.
I wonder if someone will be able to challenge the situation someday. IMHO, Amulet (CMU) was the last attempt in the research domain.
Maybe Vala is another one that has its chance (in the Gnome realm)?
QML is interesting too (in Qt realm) but it seems to be more of an evolutionary approch than something disruptive (maybe that's more reasonable btw).

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds