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 JAA24915; Wed, 28 Mar 2001 09:49:11 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA24906 for caml-list@pauillac.inria.fr; Wed, 28 Mar 2001 09:49:10 +0200 (MET DST) 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 AAA16944 for ; Wed, 28 Mar 2001 00:12:25 +0200 (MET DST) Received: from localhost.localdomain (ppp8.dyn142.pacific.net.au [210.23.142.8]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f2RMCLT09926 for ; Wed, 28 Mar 2001 00:12:22 +0200 (MET DST) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id IAA23711; Wed, 28 Mar 2001 08:11:46 +1000 Message-ID: <3AC11021.D0D6BF4A@ozemail.com.au> Date: Wed, 28 Mar 2001 08:11:45 +1000 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Brian Rogoff CC: Markus Mottl , Hendrik Tews , OCAML Subject: Re: [Caml-list] recursive modules redux, & interface files References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Rogoff wrote: > I agree with this general principle, and to be honest, 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)? I have such an example. In the Vyper interpreter, there is a very large module which handles execution of ASTs, which contains almost all the interpretive code. It was not possible to break this module into further pieces because of the mutual recursion. [I actually _did_ do this, then undid it, because of the excessive number of extra arguments that had to be passed to make it work] Vyper is an extension of Python, which does things like: 1. The expression x + y is addition of numbers if x and y are numbers, otherwise, if x or y are objects of class type, method calls. 2. The expression eval(string) evaluates string in the current context which require mutual recursion across widely separates levels of otherwise fairly logical layers. I used indirection for most of these recursions (via a class object), but the lower level core execution was best handled by putting all the routines in one module. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr