Very rarely is a nontrivial solution the "only way." Monads are a
construct that nicely represents the sequencing side-effecting
computations in a pure and strongly-typed environment. They are a nice
way to do it, but certainly not the only one.

Now I'm not confident enough to boldly make this claim, but perhaps
they're the simplest way: i.e. they capture the essence of sequencing.
Thoughts?

On 2/10/07, Bulat Ziganshin <[EMAIL PROTECTED]> wrote:
Hello haskell-cafe,

just another interesting discussion in russian forum raised such idea:

we all say that monads are the haskell way to do i/o. is it true? may
be, uniqueness types, just like in Clean and Mercury, are real way, and
monads are only the way to write programs that use uniqueness types
easier?

so, IO monad is like any other monad - it simplifies writing of
complex code, but by itself it don't solve any problems. all code that
can be written with monads can also be written using ordinal function
calls. we know it for IO monad too - in ghc, we can use low-level
representation of IO type and write imperative code without use of
any monad operators

--
Best regards,
 Bulat                          mailto:[EMAIL PROTECTED]

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to