English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] camlimages vs. labltk
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-28 (14:09)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: [Caml-list] camlimages vs. labltk
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.

-- Damien

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