Erlang for desktop applications?

Mats Cronqvist mats.cronqvist@REDACTED
Tue Aug 15 12:34:59 CEST 2006


Joe Armstrong (TN/EAB) wrote:

[...]
> Now the problem with providing an interface to gtk, tk etc (and yes I, know these exist)
> is that you have to learn and use the gtk, tk etc. programming model in Erlang.

   not really.

> If you make a 1:1 correspondence between Erlang and GTK, then you are forced to use the GTK
> programming model in Erlang - so now you have to program using some weird half-baked
> programming style involving callbacks that sucketh greatly.

   but you don't have to "make a 1:1 correspondence". gtkNode (with which i'm 
most familiar) exposes less than half of the GTK API, and no callbacks 
whatsoever. on the erlang side, everything's done through message passing.
   not that there's not a great deal of suckiness, like you say caused mainly by 
the C-iness of (in this case) GTK.

> Indeed GUI callback programming is so difficult that mere mortals find this
> impossibly difficult - witness the GUI builders that try to do the job for you.
> The need for the GUI builders arises from the horrendous mess of callback structures
> that has to be setup in order to program the simplest of tasks.

   a GUI builder is a must regardless of the callback structure. a fancy GUI is 
a very complicated thing (no matter what programming model you're using), and so 
you need a powerful tool to design one.

> The complexity of GUI programming is a direct consequence of using a sequential programming
> language for solving a concurrent problem.

   GUI programming is pretty complicated, because GUIs are complicated. 
concurrency is not really the main problem (how often do you really want to 
press two buttons at the same time?). as i see it, the complexity is caused by 
two things;

   solving ANY complicated problem in C/C++ will typically generate suckiness
   C/C++ is particularly bad at event-driven programming.

> Cross-platform????
> This I believe is the biggest mistake I've every made regarding GUIs - just believing
> that cross platform GUIs are possible at all.
> They truth is cross platform GUIs just do not look good - period end of story.

   well... the desktop apps i use on my wife's windozer are thunderbird, firefox 
and the gimp.
all cross-platform (GTK). and they DO look good.
   and of course, using a browser (or something like the konfabulator) as the 
gui is cross-platform.

   mats



More information about the erlang-questions mailing list