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 KAA19081; Sat, 9 Oct 2004 10:32:21 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA19069 for ; Sat, 9 Oct 2004 10:32:20 +0200 (MET DST) Received: from mta1.cl.cam.ac.uk (mta1.cl.cam.ac.uk [128.232.0.15]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i998WKcq032546 for ; Sat, 9 Oct 2004 10:32:20 +0200 Received: from zonule.cl.cam.ac.uk ([128.232.9.23] helo=cl.cam.ac.uk ident=[4jiLJb71NH/QDqTgIzw7I0VWmsDzi+FZ]) by mta1.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id 1CGCeH-0006F1-00; Sat, 09 Oct 2004 09:32:17 +0100 To: Alex Baretta cc: David Brown , caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Recursive lists In-reply-to: Your message of "Fri, 08 Oct 2004 19:19:58 +0200." <4166CC3E.3080909@baretta.com> Date: Sat, 09 Oct 2004 09:32:13 +0100 From: Keith Wansbrough Message-Id: X-Miltered: at nez-perce with ID 4167A214.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 baretta:01 2004:99 baretta:01 reiterate:01 fragile:01 tails:01 tails:01 equality:01 alex:01 alex:01 0200,:01 detecting:02 nodes:02 nodes:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Alex Baretta wrote: > David Brown wrote: > > On Fri, Oct 08, 2004 at 04:42:44PM +0200, Alex Baretta wrote: > > > >>Keith Wansbrough wrote: > > > > I doubt that most users of list operations want the extra overhead needed > > to check for cycles. Recursive lists are fairly rare in strict languages. Please be careful with your attributions. I did not write this comment; David Brown did. I do entirely agree, though. And I reiterate my earlier point - if you have an algorithm that uses a potentially-cyclic datastructure and depends on detecting cycles, you should build in some cycle-detection into the datastructure. You should not depend on fragile and underspecified operations like pointer equality. Alex, I didn't understand your earlier point about needing to compare *tails* of visited nodes - why is just comparing nodes not sufficient? Surely if two nodes compare physically equal, their tails must also be equal. --KW 8-) ------------------- 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