[Haskell-cafe] Robert Harper on monads and laziness

Scott Turner 2haskell at pkturner.org
Mon May 2 11:32:55 CEST 2011


On 2011-05-02 03:54, Ketil Malde wrote:
>   "There is a particular reason why monads had to arise in Haskell,
>    though, which is to defeat the scourge of laziness."
> 
> I wonder if there are any other rationale for a statement like that?

He spends one paragraph dismissing the usefulness of referential
transparency

   "You cannot easily convert between functional and monadic
    style without a radical restructuring of code.  ... you
    are deprived of the useful concept of a benign effect"

I imagine that he considered how he prefers ML the way it is, without
base libraries thoroughly rewritten to support purity. If purity and RT
aren't the reason why Haskell uses monads, what's left?  Laziness does
have disadvantages.



More information about the Haskell-Cafe mailing list