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
How important are circular lists/recursive objects?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-04 (08:46)
From: Don Syme <Don.Syme@m...>
Subject: RE: [Caml-list] Re: How important are circular lists/recursive objects?

Hi Stefan,

You might like to read my paper "Initializing Mutually Referential Abstract Objects",, where I argue that this is a serious limitation, and argue the case for an alternative.  Interestingly Scala is considering using the kind of recursive initialization I propose in the paper, though much more extensively than I originally proposed.

Cheers & best wishes,

-----Original Message-----
From: [] On Behalf Of Stefan Monnier
Sent: 04 April 2007 05:53
Subject: [Caml-list] Re: How important are circular lists/recursive objects?

> The question is: if this behavior was completely outlawed, and either you
> couldn't build up circular lists/recursive data structures of this type at
> all, or had to call special functions (List.circularize, say), to create
> them, would this be a signifigant problem?  Does anyone actually use this
> construct, and if so, for what?

This is the case in SML: you need to go through a `ref' cell in order to
create a cycle.  This has very rarely been presented as
a serious limitation.  OCaml's trick is occasionally useful, but I don't
think anybody would lose her sleep over it.


Caml-list mailing list. Subscription management:
Beginner's list:
Bug reports: