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 SAA22046; Wed, 20 Mar 2002 18:16:29 +0100 (MET) 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 SAA22824 for ; Wed, 20 Mar 2002 18:16:28 +0100 (MET) Received: from mulga.cs.mu.OZ.AU (mulga.cs.mu.OZ.AU [128.250.1.22]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g2KHGP923625 for ; Wed, 20 Mar 2002 18:16:26 +0100 (MET) Received: from hg.cs.mu.oz.au (hg.cs.mu.OZ.AU [128.250.25.19]) by mulga.cs.mu.OZ.AU with ESMTP id EAA11846; Thu, 21 Mar 2002 04:16:23 +1100 (EST) Received: (from fjh@localhost) by hg.cs.mu.oz.au (8.10.2/8.10.2/SuSE Linux 8.10.0-0.3) id g2KHGMr04575; Thu, 21 Mar 2002 04:16:22 +1100 Date: Thu, 21 Mar 2002 04:16:22 +1100 From: Fergus Henderson To: Jacques Garrigue Cc: caml-list@inria.fr Subject: Re: [Caml-list] The DLL-hell of O'Caml Message-ID: <20020321041621.A4516@hg.cs.mu.oz.au> References: <000d01c1c95b$866bc060$0b01a8c0@mit.edu> <20020312230047.M1173@ice.gerd-stolpmann.de> <20020320222038.A3148@hg.cs.mu.oz.au> <20020320204322L.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020320204322L.garrigue@kurims.kyoto-u.ac.jp>; from garrigue@kurims.kyoto-u.ac.jp on Wed, Mar 20, 2002 at 08:43:22PM +0900 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On 20-Mar-2002, Jacques Garrigue wrote: > From: Fergus Henderson > > > Adding new functions to a module ought not break binary backwards > > compatibility. If it does, then you lose many of the benefits of > > separate compilation. > > Could you specify what benefits? For example, the ability to install a new version of a library (with some new functions) without having to recompile everything that references that library. This includes the ability to use version N+1 of library `foo' with version M of library `bar', even though the binary that you have for version M of library `bar' was build using version N of library `foo' rather than version N+1. Binary distributions of libraries is very difficult if you have to upgrade them all in lock-step anytime a base library changes. > The current situation in OCaml is that you have to recompile all > dependencies everytime you change anything in the interface. > If you use a Makefile, even changing a comment will trigger a > recompilation. If you're sure nothing important changed, you can always use `touch 01010101 filename' to mark that file as old. > But, in my experience most C makefiles are written in the same way > meaning that you have to recompile everytime a header changes. Most C makefiles are written so that dependencies on third-party library header files are not included in the Makefile dependencies. (And there are good reasons for this; including such dependencies can cause as many problems as it solves...) That imples that if you install a new version of a third-party library, and then rerun make, it won't recompile your sources. Also, the issue of makefiles is irrelevant in the case of binary library distributions, as in the example above with `foo' and `bar'. > The real problem is about how to check that binary (and semantics) > compatibility is satisfied. Sure it would be *nice* if the system checked that automatically, and handled library major/minor revision numbers accordingly. But the programmer can also check this manually when releasing a new version of a library, by comparing the interface with that of the previous version (e.g. using `cvs diff'). That's what C and C++ programmers have to do, after all. There are really two issues here. One is that the language and/or implementation should give guarantees about what kinds of changes will preserve binary compatibility, including at a minimum the requirement that adding new functions should not break binary compatibility. The second issue is that it's desirable to have type-safe linking. -- Fergus Henderson | "I have always known that the pursuit The University of Melbourne | of excellence is a lethal habit" WWW: | -- the last words of T. S. Garp. ------------------- 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