[xmonad] studying xmonad code as a guideline for gui-code?
Spencer Janssen
spencerjanssen at gmail.com
Sun Dec 20 12:51:55 EST 2009
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
More information about the xmonad
mailing list