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 TAA15507; Fri, 23 Mar 2001 19:04:49 +0100 (MET) 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 TAA14814 for ; Fri, 23 Mar 2001 19:04:43 +0100 (MET) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f2NI4gX09502 for ; Fri, 23 Mar 2001 19:04:42 +0100 (MET) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id KAA18008; Fri, 23 Mar 2001 10:04:33 -0800 (PST) Date: Fri, 23 Mar 2001 10:04:33 -0800 (PST) From: Brian Rogoff To: Fergus Henderson cc: Markus Mottl , Hendrik Tews , OCAML Subject: Re: [Caml-list] recursive modules redux, & interface files In-Reply-To: <20010324043022.A19742@hg.cs.mu.oz.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 24 Mar 2001, Fergus Henderson wrote: > On 22-Mar-2001, Brian Rogoff wrote: > > I haven't found in > > my own programming a compelling case where module spanning mutually > > recursive function definitions were an issue. Is it possible to produce a > > reasonably sized example, Hendrik (or Chris)? > > In the Mercury compiler, we have made significant use of module spanning > mutually recursive procedures. For example, the code generator > is split among several modules, roughly for each language construct > (e.g. ite_gen handles code generation for if-then-elses, > switch_gen handles code generation for switches, etc.), > and since if-then-elses can contain switches (and vice versa), > the procedures in these modules are mutually recursive. Interesting. A similar example occurred in a discussion in comp.lang.ml between Matthias Blume and Greg Morrissett (concerning datatypes not functions) where MB argued as an SML/NJ maintainer that such recurrences were best placed in the same module and GM thought it best that they be split even though recursive. Clearly I lean towards MB's view on this though I take it that there are other schools of thought. What is your criteria for splitting the functions into different modules? -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr