
On Sun, Dec 20, 2009 at 05:58:29PM +0100, Günther Schmidt wrote:
Hi all,
I'm wondering if studying xmonad code will help me write better gui code. I've got some ui-code for wxHaskell, with several drop downs where the selection of one drop-down effects the contents of every other drop-down. I wrote this with IORefs all over the place and I think this problem begs for a zipperish solution.
I have only glimpsed at the xmonad code but I don't remember seeing even a single IORef, so I am asking for your opinion: Can studying xmonad code provide me with a better solution for my problem?
Günther
I'm not sure how representative xmonad is of GUI applications. Raw X11 is likely very different from wxHaskell, and xmonad isn't really interactive in the same way that GUIs are. Regardless, XMonad.StackSet is a good study in how to separate an application's model into a separately testable, purely functional module. Cheers, Spencer Janssen PS: It's true, there isn't a single IORef in xmonad's core