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 OAA02390; Mon, 29 Apr 2002 14:55:56 +0200 (MET DST) 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 OAA02386 for ; Mon, 29 Apr 2002 14:55:55 +0200 (MET DST) Received: from smtp2.cswv.com (smtp2.cswv.com [4.17.129.20]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3TCtsf20770 for ; Mon, 29 Apr 2002 14:55:54 +0200 (MET DST) Received: from smtp2.cswv.com ([10.2.3.6]) by smtp2.cswv.com with Microsoft SMTPSVC(5.5.1877.197.19); Mon, 29 Apr 2002 08:55:48 -0400 Received: FROM exchange1.cswv.com BY smtp2.cswv.com ; Mon Apr 29 08:55:47 2002 -0400 Received: by exchange1.cswv.com with Internet Mail Service (5.5.2653.19) id ; Mon, 29 Apr 2002 08:55:16 -0400 Message-ID: From: "Krishnaswami, Neel" To: caml-list@inria.fr Subject: Re: [Caml-list] Polymorphic Variants and Number Parameterized Typ es Date: Mon, 29 Apr 2002 08:55:16 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk John Max Skaller [mailto:skaller@ozemail.com.au] wrote: > > > Hmmm... beginnners question on module system .. can you recurse on it? > I'm guessing not, since there are neither specialisations nor > overloading, there's be no way to stop the recursion. ..?? There's no recursion in the module system because that would break the termination guarantee. If you think of modules as records, and functors as lambda abstractions, you can see that the module system defines a simply-typed lambda calculus. As you've noticed with C++, adding recursion to it would mean you can write nonterminating module expressions. (All this is wonderfully clearly explained in the paper, "A modular module system".) I can see why having guaranteed termination is nice, though I do really miss having recursive modules. There are a lot of problems that decompose more nicely if you have cross-module recursion. -- Neel Krishnaswami neelk@cswcasa.com ------------------- 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