xml in fptools?

John Meacham john at repetae.net
Thu May 25 22:16:18 EDT 2006

On Fri, May 26, 2006 at 01:33:05AM +0100, Duncan Coutts wrote:
> On Thu, 2006-05-25 at 16:41 -0700, Ashley Yakeley wrote:
> > Malcolm Wallace wrote:
> > 
> > > Oh, I always assume lazy I/O.  It is one of the most useful parts of
> > > Haskell, and I rely on it all the time for both interactivity and
> > > avoidance of space problems.
> > 
> > Lazy I/O is problematic and probably a bad idea for libraries:
> > <http://haskell.org/pipermail/haskell/2006-May/017998.html>
> Assuming we do have imprecise exceptions what is wrong with lazy IO?

gosh I really dislike imprecise exceptions. I would hate to use them for
any expected code path and am wary of using them for even unexpected
ones. You have to be very intimatly familier with exactly what gets
evaluated when or insert a bunch of deepSeqs and hope you don't evaluate
something too early. I think they encourage very bad and sloppy programming
practices and we wouldn't want to encourage their use as a general tool.

The only types of uses I approve of them for are things like ghci, where
you don't want errors in user typed code to abort the interpreter, and
for things like catching type errors in jhc, where it will abort the
program still, but will annotate the message with what was happening
before and after and various other useful details for tracking down the
cause of the error.

That said, Lazy IO is useful, a lot of times aborting your program on
failure of IO is the right thing to do and lazyness can make things more
elegant and faster, jhcs load time decreased signifigantly since I
started reading the 'ho' files lazily. I like having the option of Lazy
IO, I don't think it should be the default and most definitly not the
only way people interact with the world though.


John Meacham - ⑆repetae.net⑆john⑈

More information about the Libraries mailing list