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 LAA24384; Wed, 23 Jul 2003 11:35:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA31202 for ; Wed, 23 Jul 2003 11:35:51 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h6N9Zkf02840; Wed, 23 Jul 2003 11:35:47 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA27852; Wed, 23 Jul 2003 11:35:46 +0200 (MET DST) Date: Wed, 23 Jul 2003 11:35:46 +0200 From: Xavier Leroy To: Gerd Stolpmann Cc: caml-list@inria.fr Subject: Re: [Caml-list] GODI (was: CTAN/CPAN for Caml (COCAN ...?)) Message-ID: <20030723113546.A24774@pauillac.inria.fr> References: <20030715180953.GA8821@redhat.com> <3F17AC55.7050908@ozemail.com.au> <20030718072901.A11777@speakeasy.org> <1058615717.6545.84.camel@ice.gerd-stolpmann.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <1058615717.6545.84.camel@ice.gerd-stolpmann.de>; from info@gerd-stolpmann.de on Sat, Jul 19, 2003 at 01:55:18PM +0200 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 cpan:01 orthogonal:01 avoiding:01 gerd:01 acute:99 libs:01 unixes:01 python:01 coexist:01 model:01 sub-modules:01 mylib:01 ocamlc:01 -pack:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have followed this discussion with interest, although other commitments prevented me from replying earlier. I think there are two completely orthogonal issues: 1- Caml library packaging: standardizing and automating the configuration, compilation, installation, dependency handling and re-compilation when dependents change. 2- Name space management: avoiding the unfortunate situation where several packages define compilation units that have the same names. I agree with Gerd that the first issue (library packaging) is by far the most acute. The lack of a packaging framework currently makes using third-party Caml libs in a development much harder than it should be. Someone objected that this isn't a Caml-specific issue and that it can be handled by standard packaging tools. Perhaps, but the problem is that there are no standard packaging tools. Even among Linux distributions, the packaging tools vary widely. Not to mention other Unixes (BSD, Solaris, Tru64, ...), and MS Windows. This flies in the face of the cross-platform portability offered by the core Caml system. It's not reasonable to expect that the world will convert overnight to Debian's "apt". It's not reasonable either to expect library writers to package their libs for 8 different packaging systems, especially when most of them wouldn't touch Windows with a pole. That's why other cross-platform programming environments such as Perl and Python have developed their own packaging technology. Library packaging is one of those "soft", un-glamorous problems: there are no hard, open problems, just an endless series of small problems to be solved and policy decisions to be taken. I had interesting discussions with several of you concerning possible designs, but apparently these efforts ran out of steam. I'm very happy to see that Gerd (with his eminent practical sense) is giving it a try, and I wish he'd get more constructive feedback on this. Now, the name space management issue seems over-inflated to me. Yes, it can happen, and may become a serious issue once we have hundreds of libs that need to coexist. But I think we can still get a lot of mileage out of the current "global namespace for compilation units" model. In particular, most libraries can be set up so that they define only *one* top-level module (i.e. compilation unit): - put all sources in one file, possibly with sub-modules (not as ugly as it sounds -- see my Cryptokit library for an example); - put all user-visible definitions in one file, say Mylib.ml, and put internal definitions in other files with unlikely names such as MylibInternalFoo.ml, MylibInternalBar.ml, etc - use ocamlc -pack to assemble the library files into one compilation unit. Some people reject ocamlc -pack on the grounds that it prevents link-time elimination of unused sub-modules. I think they are jumping to conclusions. First, for many libraries, there is essentially no opportunity for this link-time elimination, as every sub-module is used. Second, many libraries are small enough that the increase in code size doesn't matter much. Third, this is a "quality of implementation" issue: I might be able to implement this link-time elimination for the native-code compiler (ocamlopt -pack) at some future time. The problem remains for bytecode, though, but is perhaps less acute due to the small size of bytecode. Finally, as this discussion demonstrates eloquently, there is no obviously good solution to the name space management problem. Yes, various things can be done either at the language level or at the compiler level to support finer identification and re-naming of compilation units. But I'd rather not settle on a half-baked solution to a non-acute problem. - Xavier Leroy ------------------- 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