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 QAA12377; Fri, 28 Mar 2003 16:00:39 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA11765 for ; Fri, 28 Mar 2003 16:00:34 +0100 (MET) Received: from mwinf0501.wanadoo.fr (smtp2.wanadoo.fr [193.252.22.26]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2SF0XX18439; Fri, 28 Mar 2003 16:00:33 +0100 (MET) Received: from iliana (AStrasbourg-206-1-31-236.abo.wanadoo.fr [81.51.206.236]) by mwinf0501.wanadoo.fr (Postfix) with ESMTP id C3A6F401493; Fri, 28 Mar 2003 16:00:29 +0100 (CET) Received: from luther by iliana with local (Exim 3.36 #1 (Debian)) id 18yvLI-0002PH-00; Fri, 28 Mar 2003 16:00:28 +0100 Date: Fri, 28 Mar 2003 16:00:28 +0100 To: Damien Doligez Cc: caml-list@inria.fr Subject: Re: [Caml-list] camlimages vs. labltk Message-ID: <20030328150028.GA9211@iliana> References: <4.3.2.7.2.20030327113554.0369d060@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i From: Sven Luther X-Spam: no; 0.00; sven:01 luther:01 dpt-info:01 u-strasbg:01 caml-list:01 camlimages:01 labltk:01 damien:01 hecker:01 -pack:01 foo:01 submodules:01 reuse:01 renaming:01 mylib:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, Mar 28, 2003 at 03:10:04PM +0100, Damien Doligez wrote: > On Thursday, March 27, 2003, at 08:46 PM, Chris Hecker wrote: > > >It seems like there are a couple different options: > > > >1. relax the semantics of module inclusion/initialization so that > >-pack can simultaneously provide the nested module syntax of > >Package.Foo but it doesn't have to link all of the submodules, like a > >cma > > > >2. define a new namespace system and syntax (or reuse the module > >syntax, not sure what the issues are there) > > > >Are there any other options? Did I get all of that right? > > How about a solution based on renaming ? Let's say I have two modules > from different programmers, both named "Mylib", and I want to use them > in my program. I cannot because the module system does not allow two > different modules with the same name to coexist. The obvious solution > is a tool that renames one of the Mylib modules. Then I can use both > modules in one program. > > It becomes a little more complex when you consider that a module also > imports other modules, referenced by their names. For example, I can > have (in addition to the two "Mylib" modules) another pair of modules, > Extlib and Superlib, written by two other programmers, and I want to > use them both in my program. And Extlib uses one of the Mylib, Superlib > uses the other one. Now if I rename the second Mylib into Mylib2, > I also have to tell Superlib to use Mylib2 instead of Mylib. > > So I need a tool to rename modules, both as exports and as imports, > then I can use any module I want, without changing anything in the > language, and without the need for a universal naming scheme. Does this not sound as a ugly hack ? Would it not be easier to have something akin to -pack, but without its technical problems, and have each library pack its module into a namespace propper to this library ? If all library did this by default, at library build time, then there would be no need to rename the imports, since those imports would already have the modified (that is Library.Module) names ? Friendly, Sven Luther ------------------- 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