[Haskell-cafe] The Good, the Bad and the GUI
wojtek at power.com.pl
Mon Aug 11 22:16:31 UTC 2014
Haskell is great for great many areas, let me name just two: - parsers,
translators, interpreters, compilers; highly concurrent systems.
Haskell is however not great for GUIs. I've been thinking a little why
this is so. I think one of the reasons might be that in Haskell it is
unusual to deal with data that is incomplete or otherwise erroneous. Let
me try to explain, what I mean, by example. If you declare Person class
in Java, you automatically get a thingy that you can readily use in UI
construction, because all the fields can temporarily be null, even the
required ones. In Haskell you'd need two data types: the usual proper
Haskell data type, and another which wraps every field in Maybe,
facilitates editing, validation, etc. Perhaps it would be possible to
generate one data type from the other, or generate both from a common
Let me write the same thing in other words. It is not controversial to
say on this list that specifying what is correct means, is a good idea.
But for GUIs, in addition to the strong type, you need another relaxed
type to hold the values temporarily, until the human manages to deliver
correct data, often by trial and error.
More information about the Haskell-Cafe