[xmonad] studying xmonad code as a guideline for gui-code?

wagnerdm at seas.upenn.edu wagnerdm at seas.upenn.edu
Sun Dec 20 14:16:30 EST 2009

Quoting Günther Schmidt <gue.schmidt at web.de>:

> 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?

xmonad uses a State monad transformer to maintain information.  The  
upside of this is that no mutable variables are necessary -- it just  
passes along different copies of its state as the state needs to  
"change".  The downside is that it is utterly impossible for two  
threads to share the internal state as it changes.  Since most GUI  
code is multithreaded eventually (to keep the GUI responsive during  
expensive operations), I wouldn't recommend this approach...


More information about the xmonad mailing list