Not having any experience in Haskell, but having tried Prolog a few times in the 80s and 90s, I remember the pain of doing things that fell outside the "declarative" realm.

For example, just about everything that had to do with a user interface. Printing text is a "side effect" (or in your Haskell terminology, probably seen as a monad). Asking a user a question. Responding to the user's input.

The big problem in Prolog with such constructions was that Prolog's whole view of the world was that you could search a database of rules and backtrack as necessary. But with monadic tasks, you really don't want any backtracking. You don't want to pop up a dialog on the user's screen, wait for an answer, and then backtrack (possibly trying a different dialog box) when you realize that the user's answer didn't get your program any closer to a "solution."

--
[ e d @ h a l l e y . c c ]


In reply to Re: Re: Resources for Functional Programming? by halley
in thread Resources for Functional Programming? by kvale

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.