Is functional GUI programming possible? [closed]

The Haskell approach seems to be to just wrap imperative GUI toolkits (such as GTK+ or wxWidgets) and to use “do” blocks to simulate an imperative style

That’s not really the “Haskell approach” — that’s just how you bind to imperative GUI toolkits most directly — via an imperative interface. Haskell just happens to have fairly prominent bindings.

There are several moderately mature, or more experimental purely functional/declarative approaches to GUIs, mostly in Haskell, and primarily using functional reactive programming.

Some examples are:

  • reflex-platform, https://github.com/reflex-frp/reflex-platform
  • grapefruit, http://hackage.haskell.org/package/grapefruit-ui-gtk
  • reactive, http://hackage.haskell.org/package/reactive-glut
  • wxFruit, http://hackage.haskell.org/package/wxFruit
  • reactive-banana, http://hackage.haskell.org/package/reactive-banana

For those of you not familiar with Haskell, Flapjax, http://www.flapjax-lang.org/ is an implementation of functional reactive programming on top of JavaScript.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)