Mercury

Zuurbier, E. - AMSXE Erik.Zuurbier@KLM.NL
Fri, 5 Mar 1999 10:48:32 +0100


> > The generated code must be as efficient as Clean's.
> 
> I haven't run any benchmarks against Clean, but I suspect
> that we probably pass this criteria in most circumstances.  
> We don't have to worry about lazy evaluation, which makes
> generating efficient code a lot easier.
> 
Fergus, can you explain why lazy evaluation is so loved
by functional programmers and, in contrast, apparently
a non-issue in Mercury? Or else, would it be possible and
useful to extend Mercury with lazy evaluation?

I can imagine that Mercury programs that make use of the
specific Logic-properties of the language, would virtually have
to be redesigned (rather than run through a simple transformation)
to convert them to Clean, which does not support multiple
modes, for instance.

But what about the other way around? What would a Mercury
programmer do with lazy Clean algorithms to implement them
in Mercury? If it is a mere syntax conversion, or some straight
forward transformation, that is great. Tell me where I can read more
about it.

Erik Zuurbier