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
[Caml-list] Recursive lists
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Keith Wansbrough <Keith.Wansbrough@c...>
Subject: Re: [Caml-list] Recursive lists
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

--KW 8-)

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