[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell
Subject:    Re: advice wanted on GUI design patterns
From:       Havoc Pennington <rhp () zirx ! pair ! com>
Date:       1999-09-28 1:23:25
Message-ID: Pine.BSF.4.10.9909272053250.20255-100000 () zirx ! pair ! com
[Download RAW message or body]


On Mon, 27 Sep 1999, Antony Courtney wrote:
> 
> First, it is possible to write applications in Haskell using event loops
> and mutable state.  Most of the simple toolkit bindings (such as
> TclHaskell, which is really a binding to Tk) do this.
> 

Is it possible to do this without implicitly keeping all your data in some
written-in-C component (such as the GUI components themselves)? If so,
how? (Because if not it's going to be a pretty huge spaghetti mess, it
seems to me - plus there's not much advantage to Haskell if you can't use
Haskell types for your data.)

It seems to me that the event-driven model requires "keeping your data" in
a way that Haskell does not provide for, because you need to access "the
same" data structure in all your event handlers over time, yet there is no
way to communicate between event handlers without updating some fixed
memory location...

Sigh.

I read the Haggis paper a while back and I'll have to revisit it. Thanks
for the pointers from everyone that replied, I will look at FranTk. The
problem of immediate interest to me is whether it's possible to write a
GTK+ or GNOME application in Haskell, I've been playing with Manuel's
bindings; if Tk can be bent into a Haskell-friendly model then perhaps
GTK+ also could be.

Thanks! 
Havoc








[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic