From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA08079 for caml-red; Thu, 2 Nov 2000 18:53:57 +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 IAA19532 for ; Wed, 1 Nov 2000 08:43:05 +0100 (MET) Received: from pcrm.win.tue.nl (pcrm.win.tue.nl [131.155.69.41]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id eA17h4r19923 for ; Wed, 1 Nov 2000 08:43:04 +0100 (MET) Received: from pcrm (stephan@localhost [127.0.0.1]) by pcrm.win.tue.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with SMTP id IAA08367 for ; Wed, 1 Nov 2000 08:46:24 +0100 From: Stephan Houben Reply-To: stephanh@win.tue.nl Organization: Scientific Computing Group To: caml-list@inria.fr Subject: Re: Why does the order in the Makefile matter? Date: Wed, 1 Nov 2000 08:38:39 +0100 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <200010281655.SAA31819@pauillac.inria.fr> In-Reply-To: <200010281655.SAA31819@pauillac.inria.fr> MIME-Version: 1.0 Message-Id: <00110108462300.08310@pcrm> Content-Transfer-Encoding: 8bit Sender: weis@pauillac.inria.fr On Sat, 28 Oct 2000, Pierre Weis wrote: > Hence, when the entire program is made of multiple implementation > files, those files must be linked in any order that is compatible with > the static binding rule: no definition can be linked if it refers to > an identifier that is defined after the definition at hand. In > addition, expressions to be computed must evidently appear in any > order compatible with the desired runtime behaviour. I completely understand this point, and I agree that there are legal Caml programs that have a different behavior depending on the order of the .cmo file linking. However, every program I write (and I suppose that's true for most of us) has an invariant behavior under all legal permutations of the .cmo files. Mostly because I only have 1 .ml file that actually does anything; the rest only contain side-effect-free definitions. So it would be nice if the compiler itself could put the .cmo files in an order compatible with the static binding rule. This would remove the tedium of putting the .cmo files in an appropriate order from the programmer. Would this be difficult to implement? Perhaps this could be made a compiler switch? Stephan -- ir. Stephan H.M.J. Houben tel. +31-40-2474358 / +31-40-2743497 e-mail: stephanh@win.tue.nl