Re: Event Listeners in Functional Programming

2008-10-12 Thread CuppoJava
Thank you for all your help, I read through some of the papers on functional reactive programming for GUI, but it seems like it's adding unnecessary complexity to an otherwise conceptually easy task. I guess GUI is still most intuitive when modeled as a stateful object. Thank you for the reading t

Re: Event Listeners in Functional Programming

2008-10-12 Thread Rich Hickey
On Oct 10, 8:14 pm, CuppoJava <[EMAIL PROTECTED]> wrote: > Hi guys, > I'm getting started with Clojure, and I'm programming a small gui. > > The Java "idiom" for eg. a button, is to create a button object which > contains a list of "event listeners (closures/callback functions)" > that get calle

Re: Event Listeners in Functional Programming

2008-10-12 Thread Matthias Benkard
Hi, there are some papers about “functional reactive programming” out there, which you might find interesting. FranTk [0] and, developed more recently, Grapefruit [1], are functional reactive GUI toolkit for Haskell, for example. On the other hand, Gtk2Hs [2], probably the most popular GUI fram

Re: Event Listeners in Functional Programming

2008-10-11 Thread CuppoJava
Yeah, Clojure provides all that I need for GUI programming. I was just wondering if there's an elegant way of doing GUI in a pure- functional way, without mutability. On Oct 10, 7:58 pm, Chouser <[EMAIL PROTECTED]> wrote: > On Fri, Oct 10, 2008 at 8:14 PM, CuppoJava <[EMAIL PROTECTED]> wrote: > >

Re: Event Listeners in Functional Programming

2008-10-10 Thread Chouser
On Fri, Oct 10, 2008 at 8:14 PM, CuppoJava <[EMAIL PROTECTED]> wrote: > > The Java "idiom" for eg. a button, is to create a button object which > contains a list of "event listeners (closures/callback functions)" > that get called when the button is clicked. So what is it you want the button to d

Event Listeners in Functional Programming

2008-10-10 Thread CuppoJava
Hi guys, I'm getting started with Clojure, and I'm programming a small gui. The Java "idiom" for eg. a button, is to create a button object which contains a list of "event listeners (closures/callback functions)" that get called when the button is clicked. This sort of structure relies upon the