From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,aea4cc77526f5e4a X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news2.google.com!news1.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr19.news.prodigy.net.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada References: Subject: Re: Separate Compilation in Programming Languages X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Message-ID: <7xJvj.7420$Ru4.4246@newssvr19.news.prodigy.net> NNTP-Posting-Host: 70.134.114.51 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr19.news.prodigy.net 1203725507 ST000 70.134.114.51 (Fri, 22 Feb 2008 19:11:47 EST) NNTP-Posting-Date: Fri, 22 Feb 2008 19:11:47 EST Organization: AT&T http://yahoo.sbc.com X-UserInfo1: SCSYQN_@OHV[RVT[AROR__TDFZ\@@FXLM@TDOCQDJ@_@FN@ANVUEAE[YETZPIWWI[FCIZA^NBFXZ_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ@ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_KVIOR\T_M_AW_M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN Date: Fri, 22 Feb 2008 16:12:12 -0800 Xref: g2news1.google.com comp.lang.ada:20005 Date: 2008-02-22T16:12:12-08:00 List-Id: "Robert A Duff" wrote in message news:wccr6f4y94q.fsf@shell01.TheWorld.com... > > Please define what you mean by "separate compilation". > I knew my original post would stimulate some discussion. You are correct that some form of separate compilation is available in most languages. My concern is dependency management. I will give an example in source code. with X, Y, Z, Q, R, S; -- a set of library units on which we are dependent package A is -- a package specification -- types and methods for this package end A; At this point, everything that is dependent on this specification is also dependent on the library units on which A is dependent. In Ada, we can move those dependencies to the package body. So, we have: package A is -- a package specification -- types and methods for this package end A; with X, Y, Z, Q, R, S; -- only body is dependent on these package body A is -- a package specification -- implementation of package A end A; By moving the dependencies to the package body, the specification is dependency free, as are all of the library units that become dependent on it. Further, if we use the "is separate" feature, we can push those dependencies even further down into the implementation, not something any of the other languages do very well. I don't think this is possible in Java, Eiffel, or C#. It is only possible in C++ by using the #include in the CPP file, and that is error-prone. As noted by someone else, an automated configuration control software can be of help in this regard, but it is not built into the language as it is with Ada. > RD> By the way, Eiffel compilers typically use incremental compilation, RD> which if implemented well, is strictly superior to separate RD> compilation on a file-by-file basis. But it still does not seem to solve the dependency issue as cleanly as Ada does.