[Haskell-cafe] Lazy vs correct IO [Was: A round of golf]

Jason Dusek jason.dusek at gmail.com
Mon Apr 6 21:19:05 EDT 2009

  Is the choice of whether or not to open/close with each chunk
  read something that we can reasonably hide from the I/O API's
  user? There is at least one way in which is semantically
  distinct -- that old trick of opening a tempfile and then
  unlinking it to hide it.

  It may be the sort of thing that you do on demand, too -- we
  have a file handle pool and as we run out of handles we switch
  to opening/closing. For a single really long read,
  opening/closing every 4k is just churn; if your doing
  thousands of long reads at once, though, it can't be helped.

Jason Dusek

More information about the Haskell-Cafe mailing list