[mercury-users] GUI Toolkits and Mercury

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Nov 24 00:59:59 AEDT 2005


On Wed, 23 Nov 2005, Jonathan Morgan wrote:

> > Some of the problems with existing GUIs are
> > - they are strongly imperative in nature;
> > - they do not enforce separation of application and user interface;
> > - they are invariably call-back based, which places control entirely
> >   with the GUI (not good);
> > - because everything is event driven and each event is potentially of
> >   interest to a large number of callbacks (about which the GUI engine
> >   knows nothing) a vast amount of time is wasted passing useless event
> >   messages back and forth and triggering callbacks that do nothing.
>
> So how would you improve that, since I think all modern GUIs are call-back
> based?  Anything built on them would have to be call-back based at some
> level.
>

Handling callbacks in Mercury bindings for such libraries is a real pain
in the neck in most cases as they generally force you hide program state
in all sorts of odd places (in the I/O state or in mutable variables).
How bad this is depends on the structure of the callback functions - the
GLUT binding and its associated examples in the extras distribution are
an example of a particularly restrictive callback structure.

Cheers,
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list