Jonathan Cast wrote:
On 31 Jan 2008, at 1:23 AM, Reinier Lamers wrote:

Bayley, Alistair wrote:
More than one person has posted previously about the flaws and traps of lazy IO. A common position seems to be "don't do lazy IO".

Still, when I was browsing the Haskell' wiki a few days ago, I couldn't find any proposal to remove lazy I/O or move it into some special System.IO.Lazy (or System.IO.UnsafeEvilFunctionsThatSacrificeBabies) ...

Sacrificing babies is not a unique characteristic of lazy IO, of course; it's true of any file IO on a non-versioning file system.


However you can contain the pain if it's in the IO monad, and be in no worse situation than conventional languages.

If the pain is unsafeInterleaved all over the place, then you actually *are* in a worse situation.

ObHaskell' : lazy IO shouldn't be in any haskell standard, since it's not referentially transparent. It should be a powerful but dangerous feature enabled by certain implementations in an implementation specfic way. (unsafeInterleaveIO itself is not haskel98, I'm fairly sure)

Jules

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

Reply via email to