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 RAA23029; Thu, 22 Mar 2001 17:56:35 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA23550 for ; Thu, 22 Mar 2001 17:56:34 +0100 (MET) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2MGuXb01015 for ; Thu, 22 Mar 2001 17:56:33 +0100 (MET) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id IAA29306; Thu, 22 Mar 2001 08:56:25 -0800 (PST) Date: Thu, 22 Mar 2001 08:56:25 -0800 (PST) From: Brian Rogoff To: Markus Mottl cc: Hendrik Tews , OCAML Subject: Re: [Caml-list] recursive modules redux, & interface files In-Reply-To: <20010322140157.A7070@miss.wu-wien.ac.at> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 22 Mar 2001, Markus Mottl wrote: > Hendrik Tews schrieb am Thursday, den 22. March 2001: > > I would like to vote for solutions that work for the common case > > when writing large programs, even if they are hacks, considered > > from a theoretical point of view. > > I am not so fond of sacrificing theoretical beauty: it usually seems > to be the case that there are working solutions that are also elegant - > it's only a matter of thinking about them long enough. You might speed > up development a bit by allowing hacks if you cannot immediately find > a sound solution, but IMHO it is hardly ever a good idea in the long run. 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'm annoyed by the inability to have a mutually recursive *type* definition and functor instantiation, and that problem can be solved with recursive modules (Claudio Russo says it works in a development version of Mosml), but I haven't had this problem with functions yet. As an aside, Claudio mentioned that it would be easy to extend OCaml to support this feature: are there any plans to do so? If not, maybe I'll push for it when the Consortium is set up. > > Cross module recursion of functions is soo useful, that it > > should be made to work --- even if the solution seems stupid with > > respect to the example above. I agree that the workaround is a tiny bit ugly, but I'm not convinced that the problem is so great that it justifies any kind of new kludge. Convince me! My mind is open (or include'ed :) > Nearly everytime I had thought "now I need recursive modules", I found > other, even elegant ways to do it. How about the case I mention above? I think that there are a few cases where some extensions are necessary, however... > If we really want them, please let's don't put aside theory but take > existing clean solutions (e.g. see Claudio Russo's thesis). Yes. Let's have the extensions be clean, well founded ones. Even some people in industry realize that this is the right way to go. :-) I've snipped the module inclusion stuff because I think that while the need for a workaround is unfortunate, I think that there are bigger fish to fry. -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr