[mercury-users] re: gsat, Mercury vs functional languages, nondeterminism

David Glen JEFFERY dgj at cs.mu.OZ.AU
Tue Sep 15 14:29:11 AEST 1998


On 15-Sep-1998, Don Smith <dsmith at cs.waikato.ac.nz> wrote:
> 
> OK, so how about a pure, eager functional language?  Pure ML with linear
> types/monads. Or eager Haskell.  (Is it possible? How essential is 
> laziness for monads?)

In one sense, laziness and monads are quite orthogonal concepts. However, I
would imagine that laziness is extremely important if you are using a list
monad to handle nondeterminism. In this case, you only want solutions (list
elements) to be created as they are needed. Otherwise, for example, having an
infinite number of solutions could be really bad. Even with a finite number of
solutions, the performance hit could be arbitrarily bad, I guess, if you are
needlessly performing computation.


dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Did you just call everyone "chicken"?
PhD student,                    |  Homer: Noooo.  I swear on this Bible!
Department of Computer Science  |  Marge: That's not a Bible; that's a book of
University of Melbourne         |         carpet samples!
Australia                       |  Homer: Ooooh... Fuzzy.



More information about the users mailing list