On Tue, Dec 9, 2008 at 4:58 PM, Henning Thielemann
<[EMAIL PROTECTED]> wrote:
>
> What are the reasons, you do not like lazy IO? Yes, currently it's a hack
> using unsafeInterleaveIO. But I hope someday one can hide this safely in a
> nice monad. But in general I find lazy stream processing a very elegant
> way of programming. Why else should we use Haskell and not, say OCaml?

The main reason I don't like lazy IO is that you need to force
evaluation while the handle is open, or leave handles open.  Both are
non-optimal, although using Control.Parallel.Strategies makes the
former at least palatable to me.  Unfortunately I don't like most
strict IO solutions I've seen either, although for different reasons.

I do agree that lazy stream processing is very elegant.  It just
sometimes intersects with the real world badly (e.g. half-closed
handles, handles which are still open because they were never read to
EOF, etc.).

At the moment I'm trying to find the ideal of good performance, stream
processing, and real-world concerns removed.  It seems to me that the
Iteratee idea is worth exploring, as it may turn out to be fruitful.
And, it just feels right.  So I'm willing to spend some time on it.

John
_______________________________________________
haskell-art mailing list
haskell-art@lurk.org
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to