From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id BF554BBA7 for ; Thu, 9 Feb 2006 00:41:44 +0100 (CET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k18NfhPA005144 for ; Thu, 9 Feb 2006 00:41:44 +0100 Received: by wproxy.gmail.com with SMTP id 68so1609193wri for ; Wed, 08 Feb 2006 15:41:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AwEicrCyYh+k+V7xVR74Cgq4gIAfP7jGGDf/rg8nIFDKdyeAVd7hxN65xQSTb9WoWRjJRT1QmiXbcS3vvAt04ozKJk55l9maLARNsdpStyemD3x9ggaOORkcfmCY6enzxv5Bjjv0e17obbCbOj9HA30dwAKJb1wCOocmonaaK20= Received: by 10.65.38.13 with SMTP id q13mr1860099qbj; Wed, 08 Feb 2006 15:41:42 -0800 (PST) Received: by 10.64.10.15 with HTTP; Wed, 8 Feb 2006 15:41:42 -0800 (PST) Message-ID: Date: Thu, 9 Feb 2006 12:41:42 +1300 From: Jonathan Roewen To: Alessandro Baretta Subject: Re: [Caml-list] Namespace clash Cc: OCaml , metaocaml-hackers-l@cs.rice.edu In-Reply-To: <43E9F1EE.1070502@barettadeit.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43E9F1EE.1070502@barettadeit.com> X-Miltered: at nez-perce with ID 43EA81B7.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 compiler:01 trivial:01 baretta:01 baretta:01 barettadeit:01 clashes:01 clashing:01 cmxa:01 metaocaml:01 xcaml:01 compiler:01 metaocaml:01 unreasonable:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 I made such a modification to ocaml compiler to do this, and submitted my patch to mantis. I don't know if Xavier et al care too much about my patch, but it is fairly trivial to implement (a string list ref, and a fold). Jonathan On 2/9/06, Alessandro Baretta wrote: > Gentlemen--most specifically Xavier, > > Every other year I have mentioned on this list that I have encountered a = module > name clash problem, rendering some bit of code unusable and my life very > miserable. It happened again today. Hence, this post, to help me relieve = my > frustration. > > Luckily, today I control one of the two modules whose names collide, so I= can > easily overcome the problem by renaming one file and changing all relevan= t > references to it in a relativeley self-contained sub-project of my full s= ource > tree. Were it otherwise, I'd be in trouble. Let me state that I am curren= tly > managing a source tree comprising approximately ten man years of work and > 236klocs as of today, including generated code. When a project grows to t= his > size, it is relatively easy to produce such name clashes. > > The clashing modules are Liveness in the metanative.cmxa library of the > MetaOcaml project and a Liveness module in a PLC application based on my > AS/Xcaml. I realize that "liveness" is a meaningful word to a compiler au= thor, > but it also is to a automation engineer. It is doubtful that either the > MetaOcaml team or I have a greater right to this name, and it is unreason= able to > renounce many useful words just because they might be of common interest. > > Xavier's official position until now has been the following: "You guys ha= ve the > -pack option; use it." This is probably the best solution overall, but it= is > hardly reconcilable with the fact that out there in the wild--and in my o= wn > repository--there are truckloads and truckloads of code that don't use it= and > that would need to be modified to use it, because of the need to explicit= y open > in the projects source files all referenced libraries. Hence, it is impos= sibile > for the build system to automatically manage namespacing issues. > > Probably, all that ocaml lacks to properly handle namespacing is a -open > directive, telling the compiler to imply a "open Xxxx" at the beginning o= f all > .ml and .mli files on the command line. Given this compiler flag, the bui= ld > system could take care of everything. > > I'm sure there are other ways to solve this issue, and I'm non really try= ing to > sell anyone my idea. As I stated, I'm just writing to relieve my frustrat= ion. > > Alex > > -- > ********************************************************************* > > Ing. Alessandro Baretta > > Studio Baretta > http://studio.baretta.com/ > > Consulenza Tecnologica e Ingegneria Industriale > Technological Consulting and Industrial Engineering > > tel. +39 02 370 111 55 > fax. +39 02 370 111 54 > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >