Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
RE: [Caml-list] laziness
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-09-06 (08:44)
From: Erik de Castro Lopo <ocaml-erikd@m...>
Subject: Re: [Caml-list] laziness
On Mon, 6 Sep 2004 01:57:41 +0100
Richard Jones <> wrote:

> One thing that worries me about laziness.
> Doesn't laziness often indicate a bug in the code?  ie.  You've
> written an expression in the program, but that expression is never
> used.  This is dead code, right?  Hence a bug?

Not necessarily, but I'm not 100 sure I can justify that.

Consider mathematical code that uses lazy evaluation. Certain
expressions might be expressed in terms of an infinite sum of
terms. It would also be possible to have two expressions
declared like this, divide one by the other and have something
which when evaluated results in a finite constant and without 
even trying to evaluate the two infinite sums.

  Erik de Castro Lopo (Yes it's valid)
"I don't think any MS Exec will ever die of old age. Satan
doesn't need the competition."
-- Digital Wokan on

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: