[Haskell-cafe] The Good, the Bad and the GUI
alois.cochard at gmail.com
Tue Aug 12 09:40:28 UTC 2014
I think the way Jon Sterling integrated validation in his extensible
library might give some inspiration about using a similar approach to solve
the specific problem you describe.
He did a great talk about it recently, I highly recommend it:
On 11 August 2014 23:16, Wojtek Narczyński <wojtek at power.com.pl> wrote:
> Dear All,
> 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.
> Comments welcome.
> Kind regards,
> Wojtek Narczyński
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe