On Tue, May 14, 2002 at 12:32:30PM -0400, Jan-Willem Maessen wrote: > Chalk me up as someone in favor of laws without exceptions.
Do you ever use floating point addition?
I rarely use floating point, but it is sometimes more useful than the
alternatives, as long as you bear in mind its limitations.
In general, programmers should be allowed to do unsafe things, as long
as they explicitly ask for it (by, say, using floating point). I
guess these monad laws are not such a case.
I'm very interested by your ideas to make Haskell better behaved:
> ...
> That said, "seq" is a big wart on Haskell to begin with. I might be
> willing to allow "nice" rules like the monad laws to apply *as long as
> the results are not passed (directly or indirectly) to seq*. But I'm
> not willing to go from "the IO monad disobeys the laws in the presence
> of seq, and that might be OK" to "my monad disobeys the laws in code
> that never uses seq, and that's OK because even IO breaks the monad
> laws". And I'd really much rather we cleaned up the semantics of
> seq---or better yet, fixed the problems with lazy evaluation which
> make seq necessary in the first place. [Let me be clear: I believe
> hybrid eager/lazy evaluation, the subject of my dissertation, does
> eliminate the need for seq in most cases---so I'm a bit biased here.]
This sounds very interesting! Is your dissertation available?
My main complaint about Haskell at the moment is that it seems
remarkably difficult to avoid space leaks due to laziness issues; your
approach seems like a promising way to avoid that.
Best,
Dylan Thurston
msg10904/pgp00000.pgp
Description: PGP signature
