[prev in list] [next in list] [prev in thread] [next in thread]
List: haskell
Subject: Re: FW: Exceptions are too return values!
From: Simon L Peyton Jones <simonpj () dcs ! gla ! ac ! uk>
Date: 1998-06-16 13:16:52
Message-ID: 9806161300.AA23661 () avon
[Download RAW message or body]
> Simon, I'm sure that a really thorough programmer such as yourself
> would never forget to insert such a test. But, as was recently
> demonstrated on this mailing list ;-), I'm quite fallible.
> I'm sure there are many other fallible Haskell programmers around.
Don't worry, I'm fallible all right, as much GHC bug mail demonstrates!
> Now, we can certainly debate the likely frequency of such bugs, and
> their cost, and compare this with the advantages and disadvantages
> of exception handling. In fact, it does seem likely that such
> bugs would be very rare. The cost of each such bug may be high,
> but if they occur infrequently enough, then the overall cost will be small.
> So maybe you just meant that it wasn't likely to be a significant problem
> in practice. If that was what you meant, then I'm inclined to agree
> with you.
Yes, that's what I meant. I'm probably guilty of overstatement.
I do strongly feel that the cost/benefit equation comes down strongly
on the side of the NDSet story.
> > I simply don't think it's reasonable to comletely prescribe
> > the evaluation order of a lazy functional program.
>
> Why not? Because it would inhibit optimization?
Not just that; it also places extra side conditions
on reasoning about programs: now any reasoning steps
have to preserve evaluation order.
Incidentally, if you *do* want to preserve evaluation order
then you can always use "seq". GHC guarantees not to move
evaluations past "seq".
Simon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic