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 TAA27732; Sun, 16 Mar 2003 19:34:46 +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 TAA28126 for ; Sun, 16 Mar 2003 19:34:45 +0100 (MET) From: brogoff@speakeasy.net Received: from grace.speakeasy.org (grace.speakeasy.org [216.254.0.2]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h2GIYif08213 for ; Sun, 16 Mar 2003 19:34:45 +0100 (MET) Received: (qmail 28155 invoked by uid 36130); 16 Mar 2003 18:34:43 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 16 Mar 2003 18:34:43 -0000 Date: Sun, 16 Mar 2003 10:34:43 -0800 (PST) To: Chris Hecker cc: "caml-list@pauillac.inria.fr" Subject: Re: Module recursion (Was Re: [Caml-list] Re: Haskell-like syntax) In-Reply-To: <4.3.2.7.2.20030315213334.037caf08@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; brogoff:01 recursion:01 caml-list:01 haskell-like:01 functor:01 pierre:01 weis:01 spanning:01 spaghetti:01 hecker:01 admittedly:01 workarounds:01 impure:01 recursively:01 decoupling:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Are you sure you agree? I was claiming that I could survive (just barely, but the will to live is strong) with the ability to have functor instantiations and type declarations be mutually recursive. Of the two issues you bring up, I think having the ability to have mutually recursive functions across module boundaries is *by far* more important than the ability to spread types across module boundaries. We can sort of do it now, with references, but we have the same problem as with theworkaround I mentioned for "where": reduced polymorphism. A few years ago, on this list, in a discussion on polymorphic recursion, Pierre Weis mentioned a "forward" construct in an experimental Caml which could be used for both PR and module spanning recursive functions. Such a construct seems worthwhile. As far as spreading types across module boundaries, I'm content with the status quo, but, as always, open to being convinced by examples and well reasoned arguments. Do you have compelling examples? I see this a lot in OO languages, but I find a lot of what I see there spaghetti data typing. -- Brian On Sat, 15 Mar 2003, Chris Hecker wrote: > > >The most annoying (to me) case where the lack of module recursion is > >really hits is the problem of wanting type declarations and functor > >instantiations in a recursive relationship. If this problem, which seems > >like more of a compilation problem than a typing problem, were fixed, I > >don't think I'd care that much about having a general recursive module > >facility. I can live with the (admittedly sometimes ugly) workarounds in > >other cases where module recursion is desirable. ... That's not to say I > >wouldn't like or use a general recursive module feature, but the full > >problem seems awfully hard in a (strict, impure) language like ML and I > >doubt that I'll see it in OCaml before I retire. > > I agree with this. If I could just call functions and use types > recursively across modules, I'd be 95% satisfied and it would allow 95% of > the decoupling needed for large projects, and it's probably only 5% of the > work (I think there was a tiny patch that allowed this in an older version > of caml). That would be great. We don't need the 100% perfect recursion > solution to make caml much more useful large projects. 95% now better than > 100% never. :) > > Chris > > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners