From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA32627; Mon, 6 Sep 2004 10:44:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA30778 for ; Mon, 6 Sep 2004 10:44:27 +0200 (MET DST) Received: from smtp-2.syd.swiftdsl.com.au (smtp-2.syd.swiftdsl.com.au [218.214.224.98]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id i868iP3n017178 for ; Mon, 6 Sep 2004 10:44:26 +0200 Received: (qmail 27493 invoked from network); 6 Sep 2004 08:44:35 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp-2.syd.swiftdsl.com.au with SMTP; 6 Sep 2004 08:44:35 -0000 Received: from coltrane (localhost [127.0.0.1]) by coltrane.mega-nerd.net (Postfix) with SMTP id 6FAEC7B8E for ; Mon, 6 Sep 2004 18:44:20 +1000 (EST) Date: Mon, 6 Sep 2004 18:44:20 +1000 From: Erik de Castro Lopo To: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] laziness Message-Id: <20040906184420.25a3b8dc.ocaml-erikd@mega-nerd.com> In-Reply-To: <20040906005741.GA20406@annexia.org> References: <413879B6@webmail> <20040906005741.GA20406@annexia.org> Reply-To: caml-list@pauillac.inria.fr Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 413C2369.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 bug:01 bug:01 sep:01 lazy:02 laziness:02 laziness:02 necessarily:02 nospam:97 age:96 wrote:03 infinite:05 infinite:05 uses:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 -- +-----------------------------------------------------------+ Erik de Castro Lopo nospam@mega-nerd.com (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 LinuxToday.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners