From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA05673 for caml-redistribution; Thu, 9 Dec 1999 21:30:35 +0100 (MET) 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 KAA07792 for ; Thu, 9 Dec 1999 10:15:26 +0100 (MET) Received: from dpt-info.u-strasbg.fr (dpt-info.u-strasbg.fr [130.79.75.2]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id KAA26372 for ; Thu, 9 Dec 1999 10:15:25 +0100 (MET) Received: from lambda.u-strasbg.fr (lambda [130.79.75.49]) by dpt-info.u-strasbg.fr (8.7.5/8.6.9) with ESMTP id KAA25575; Thu, 9 Dec 1999 10:09:02 +0100 (MET) Received: from luther by lambda.u-strasbg.fr with local (Exim 3.03 #1 (Debian)) id 11vza4-0008Gy-00; Thu, 09 Dec 1999 10:09:44 +0100 Date: Thu, 9 Dec 1999 10:09:44 +0100 From: Sven LUTHER To: Gerd Stolpmann Cc: John Prevost , caml-list@inria.fr Subject: Re: Module hierarchy revisited Message-ID: <19991209100944.A31727@dpt-info.u-strasbg.fr> Reply-To: luther@dpt-info.u-strasbg.fr Mail-Followup-To: Gerd Stolpmann , John Prevost , caml-list@inria.fr References: <87bt876w6f.fsf@isil.maya.com> <99120701504200.13076@ice> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: <99120701504200.13076@ice>; from Gerd.Stolpmann@darmstadt.netsurf.de on Tue, Dec 07, 1999 at 12:19:31AM +0100 Sender: weis 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