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 RAA00185; Tue, 1 Apr 2003 17:05:23 +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 RAA31937 for ; Tue, 1 Apr 2003 17:05:21 +0200 (MET DST) Received: from saul.cis.upenn.edu (SAUL.CIS.UPENN.EDU [158.130.12.4]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h31F5K517633; Tue, 1 Apr 2003 17:05:20 +0200 (MET DST) Received: from localhost (localhost [127.0.0.1]) by saul.cis.upenn.edu (8.12.8/8.12.8) with SMTP id h31F5Gtf001659; Tue, 1 Apr 2003 10:05:17 -0500 (EST) To: Damien Doligez cc: caml-list@inria.fr Reply-to: bcpierce@cis.upenn.edu Subject: Re: [Caml-list] naming conflicts (was: camlimages vs. labltk) In-reply-to: Your message of Tue, 01 Apr 2003 16:14:37 +0200. <45804206-644C-11D7-9F5C-0003930FCE12@inria.fr> Date: Tue, 01 Apr 2003 10:05:16 EST Message-ID: <1658.1049209516@saul.cis.upenn.edu> From: "Benjamin C. Pierce" X-Spam: no; 0.00; caml-list:01 camlimages:01 labltk:01 functors:01 functor:01 occuring:01 naively:01 toplevel:01 linking:02 modules:02 module:03 variable:03 defaults:03 anyway:05 variables:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Now that I think about it, I think both problems could be solved > by changing toplevel modules into functors (instead of modules with > free variables). Then we only need a small linking language to tell > which export to use to satisfy each import. With suitable defaults > (an import is satisfied by the export of the same name), this could > be made compatible with the current system. Wouldn't this create all sorts of problems with coherence (requiring sharing declarations to fix)? The big difference between a functor and a module with a free variable is that if you have *two* modules and you see the same variable name occuring in them, you can be sure that, at link time, these names will get bound to the same module, so no need for sharing declarations. If you change to functors (naively, anyway), you lose this guarantee. - B ------------------- 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