Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Meta module in findlib and the need for namespaces
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-23 (09:00)
From: Sven LUTHER <luther@d...>
Subject: We should start using -pack by default when building libraries, (was : Re: [Caml-list] Meta module in findlib and the need for namespaces)
On Sun, Sep 22, 2002 at 11:29:20PM +0200, Gerd Stolpmann wrote:
> Hi, 
> > This incompatibility between findlib and dynlink is the 
> > first example I have encountered of a nameclash bug in Ocaml 
> > software. Of course, Gerd could easily solve the problem by 
> > renaming his Meta to Findlib_meta, or something like that, 
> > but it would be a lot easier to have a namespace construct 
> > to allow Gerd to distinguish *his* Meta from the one in the 
> > standard library.
> I think there are two problems:
> (1) The name clash as such
> (2) The fact that dynlink.cma contains a hidden module (no cmi is
>     installed for it), making the name clash surprising and hard
>     to debug.
> Note that dynlink.cma not only contains Meta, but also other modules
> with plain names: Misc, Config, Ident, Path, Types, i.e. names for
> which name clashes are much more likely than for cryptic names.

Well, is it not for exactly this kind of problems that the -pack option
was implemented ? Would it not solve all this kind of problem if it
would be a standard that all libraries should be using the -pack option
for including their modules, thus having a Dynlink.Meta, Dynlink.Misc,
Dynlink.Config, ... (and also i guess findlib would then have a
Findlib.Meta or something such ?).

Sure this would cause a bit of backward compatibility, but nothing that
could not be solved by a simple open at the begining of the sources, and
it would also most probably help solving much of the 'namespace'
discution that happens here from time to time.

What do you all think about this, is this a valuable solution, or are
there profound reason for not going that way ? 


Sven Luther
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: