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 MAA04729; Wed, 25 Sep 2002 12:10:09 +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 MAA04723 for ; Wed, 25 Sep 2002 12:10:08 +0200 (MET DST) Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g8PAA8511540 for ; Wed, 25 Sep 2002 12:10:08 +0200 (MET DST) Received: from mel-rta7.wanadoo.fr (193.252.19.61) by mel-rto6.wanadoo.fr (6.5.007) id 3D760C2500BDD1A7 for caml-list@inria.fr; Wed, 25 Sep 2002 12:10:07 +0200 Received: from iliana (80.9.198.56) by mel-rta7.wanadoo.fr (6.5.007) id 3D8011E600798A27; Wed, 25 Sep 2002 12:10:07 +0200 Received: from luther by iliana with local (Exim 3.35 #1 (Debian)) id 17u8Wz-0000Nx-00; Wed, 25 Sep 2002 11:32:29 +0200 Date: Wed, 25 Sep 2002 11:32:29 +0200 To: =?iso-8859-1?Q?Micha=EBl_Gr=FCnewald?= Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: We should start using -pack by default when building libraries, (was : Re: Meta module in findlib and the need for namespaces) Message-ID: <20020925093229.GA1424@iliana> References: <3D87406D.9010406@baretta.com> <20020922212920.GG914@ice.gerd-stolpmann.de> <20020923084301.GA1272@iliana> <20020923163619.A16997@pauillac.inria.fr> <20020924063041.GA1436@iliana> <87d6r2llnw.fsf@ketanu.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87d6r2llnw.fsf@ketanu.dyndns.org> User-Agent: Mutt/1.4i From: Sven LUTHER Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Sep 25, 2002 at 06:48:19AM +0200, Michaël Grünewald wrote: > Sven LUTHER writes: > > > On Mon, Sep 23, 2002 at 04:36:19PM +0200, Xavier Leroy wrote: > > > > > 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 ? > > > > > > Yes, exactly. > > > > :))) > > > > > For other existing libraries, backward compatibility can deter using > > > -pack, but I'd encourage authors of new libraries to use it in order > > > to export only one compilation unit. > > > > Could we consider making using -pack the standard for a future version of > > ocaml (3.07) and add a -nopack version for those that don't want to use > > it, especially when building .cmas ? > > > This would need a bit of discussion first, but mostly, i don't think > > anyone would object to this, at least not very strongly. > > So every unmaintained code and Makefiles becomes all suddenly obsoletes ? unmaintained code is not good to have around anyway, it will most probably break some in the future anyway (when there is a ocaml 4.0 for example ?). > This is a really bad thing to do things like this, and it is so easy to > write wrappers scripts over the compiler, so it has defaults suitable for > your needs ... There is no need to modify standards for that. But the change is only adding the appropriate open at the top of the files, i guess it could even be done with automatic translation or something such. Also, i guess the Pervasive library will be opened by default, and maybe also the standard library. This namespace problem is one that ocaml was having since a long time, and which will become only worse as time passes and more library will be written. So are you saying that we should stay with something that will cause more and more problem as time passes, just because some obsolete and unmaintained code will break in this case ? Anyway, this can be done in a painless incremental way. We decide that starting now, all libraries should use the -pack option when it is possible, and slowly migrate to using that for the existing code, but still keep the default behavior as usual. Later, when we are satisfied that it works well and most libraries are ported to using -pack (and the acompanying code using it also), we can modify the behavior to use -pack by default for libraries. And btw, it is more natural to write, for example Gdk.Event.Button than GdkEvent.Button, as we do now, don't you think ? > > That said ... > > > > John Carr Wrote : > > > > | OCaml 3.06 does not support -pack when using native code on a system > > | without the GNU linker. If you release software that depends on -pack, > > | I will not be able to use it. > > > > Well, this would cause a problem, which need to be solved before -pack > > is supported as standard. What are exactly the cases were it causes > > problem, (AIX when not using the GNU linker, i guess, but also maybe > > windows ?) and is there any chance this can be solved soonly ? > > > > Alternatively, this could be a feature that could be enabled/disabled at > > build time ? > > E.g. with the `-pack' option ? :) At build time of the ocaml compiler suite, with a configure option, so that you could build an ocaml suite to either use -pack by default or not, and a ocamlc option to return the default used pack option, so you could use it to write the libraries accordyingly (well, maybe this is not easily). Friendly, Sven Luther ------------------- 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