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 HAA21884; Thu, 20 Nov 2003 07:15:16 +0100 (MET) 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 HAA20776 for ; Thu, 20 Nov 2003 07:15:15 +0100 (MET) Received: from mail1.tpgi.com.au (mail.tpgi.com.au [203.12.160.57]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAK6FC122328 for ; Thu, 20 Nov 2003 07:15:13 +0100 (MET) Received: from 203-213-85-204-syd-ts17-2600.tpgi.com.au (203-213-85-204-syd-ts17-2600.tpgi.com.au [203.213.85.204]) by mail1.tpgi.com.au (8.11.6/8.11.6) with ESMTP id hAK6F2Q22672; Thu, 20 Nov 2003 17:15:02 +1100 Subject: Re: [Caml-list] GC and file descriptors From: skaller Reply-To: skaller@ozemail.com.au To: Brian Hurt Cc: Ville-Pertti Keinonen , Caml Mailing List In-Reply-To: References: Content-Type: text/plain Message-Id: <1069305275.24578.57.camel@pelican> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 20 Nov 2003 16:14:36 +1100 Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ozemail:01 hurts:01 haskell:01 deallocated:01 coinductive:01 coinductive:01 ocaml:01 descriptors:01 nov:01 lazy:02 lazy:02 arbitrary:02 wrote:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 2003-11-20 at 04:36, Brian Hurt wrote: > On 20 Nov 2003, skaller wrote: > 3) While there are programs which will terminate with lazy evaluation that > won't terminate with strict evalulation, such programs mainly appear only > as counter examples. If I know that I'm in a strict evaluation language, > I just don't do that ("Doctor- it hurts when I do this!" "Well, don't do > that then!"). For me it is hard to say, since I don't use a lazy language, *but* there are times when I am thinking of 'streaming' things rather than building whole data structures in memory and transforming them in phases. Whilst you can do that in a strict language like Ocaml I would guess it is (at least a bit more) *automatic* in a lazy language like Haskell. I guess that would be a major productivity and performance boost -- the code is easier to write, and far less memory is required (since for example only a small local part of a list will exist at any time, the not yet needed part is not yet built, and the already used part is not reachable and thus deallocated). So I would not be so quick to discredit lazy evaluation as a bad performer, I guess considerable experience would be needed first to form a judgement. One indication I have is that Charity is lazy. I don't know if that is an arbitrary choice or necessary for a reasonable representation of coinductive data types. Anyone know anything aboy the connection between lazy evaluation and coinductive types? ------------------- 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