Date: Thu, 9 Dec 1999 10:09:44 +0100
From: Sven LUTHER <luther@dpt-info.u-strasbg.fr>
To: Gerd Stolpmann <Gerd.Stolpmann@darmstadt.netsurf.de>
Subject: Re: Module hierarchy revisited
In-Reply-To: <99120701504200.13076@ice>; from Gerd.Stolpmann@darmstadt.netsurf.de on Tue, Dec 07, 1999 at 12:19:31AM +0100
On Tue, Dec 07, 1999 at 12:19:31AM +0100, Gerd Stolpmann wrote:
> On Sat, 04 Dec 1999, John Prevost wrote:
> >I just came up with what seems like a reasonable way to package my
> >modules hierarchically (to avoid namespace collisions) in a reasonable
> >way.
>
> I used to give modules of a package common prefixes, e.g. Mypackage_foo,
> Mypackage_bar, Mypackage_baz. This is not too inconvenient because I often
> program in an object-oriented way, and thus the most frequent names are method
> names which need not to be qualified.
>
> But I agree: There is a problem.
... skipped ...
Another place where this would be very usefull is the following :
Actually there are two installation schemes for ocaml packages :
* Some install their stuff in a subdirectory of /usr/.../lib/ocaml. and you
have to tell the system that you are using this directory. One example of
this is the ocamltk package i think.
* Others simply put their stuff in /usr/.../lib/ocaml. This is a problem,
because it can produce name clashes, but modules put there are directly
accesible without further work.
One advantage of the first approach was that you can then easily remove all
stuff from said package by removing the subdirectory. This was a concenr in
the past, but nowadays, with propper packaging support this is no more a
problem.
Also there is still a name clash in the first way of doing things, if there is
the same module in the ocamllib directory, and in the package.
With directory as modules support we use the cleaner first aproach, as well as
avoiding any name clashes.
This will become more and more a concern as ocaml support grows larger.
Any chance to see something like this in a next release ?
Anyone willing to write a patch to test this (now that ocaml if free software)
Friendly,
Sven LUTHER
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:29 MET