[Haskell-beginners] appropriateness of haskell for GUIs

Michael Mossey mpm at alumni.caltech.edu
Sat Mar 21 08:30:17 EDT 2009

Thomas Davie wrote:
> On 21 Mar 2009, at 00:16, Michael P Mossey wrote:
>> Hello, I'm totally new to Haskell. I'm thinking of using it for a 
>> personal project, which is a gui-based musical score editor. 
> The rough situation of GUI programming on Haskell is that it works just 
> as well as in any imperative programming language.  This is rather 
> disappointing, simply because so many other things are massively easier 
> in Haskell, and this isn't true of GUI programming (yet).

Hi Bob,

I can imagine that GUI programming is no easier (yet). It is inherently 
very "stateful." GUI's have modes, such as which screens are displayed, 
which dialogs are displayed, which options within those dialogs are 
valid given the other state of the program, etc. When I write GUIs, I 
often diagram them as state machines to get a handle on what's going on.

So, I'm not familiar with GUI programming on Haskell, but would you say 
the statefulness of GUIs (in their typical implementations) is the 
reason they are no easier on Haskell?

I strongly prefer to use qtHaskell because I'm familiar with Qt, and Qt 
is extremely capable. For example, it can draw text and shapes with 
antialiasing, which will be great for a music score editor. Music scores 
have lots of small shapes to fit on the screen, and antialiasing will 
provide ease of reading. I don't know how much of Qt is implemented in 
qtHaskell, or whether the latest version of Qt (4.4) is implemented.


More information about the Beginners mailing list