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,UTF8 Path: g2news1.google.com!news3.google.com!news.germany.com!news.belwue.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Dirk Heinrichs Newsgroups: comp.lang.ada Subject: Re: Separate Compilation in Programming Languages Date: Sat, 23 Feb 2008 13:45:07 +0100 Organization: Privat Message-ID: References: <7xJvj.7420$Ru4.4246@newssvr19.news.prodigy.net> NNTP-Posting-Host: p54bb90b9.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Trace: online.de 1203770707 20762 84.187.144.185 (23 Feb 2008 12:45:07 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Sat, 23 Feb 2008 12:45:07 +0000 (UTC) User-Agent: KNode/0.10.9 Xref: g2news1.google.com comp.lang.ada:20022 Date: 2008-02-23T13:45:07+01:00 List-Id: adaworks@sbcglobal.net wrote: > 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. Maybe I misunderstood something, but isn't it so that (with gnat) when A.adb is recompiled, it sort of "includes" the subunits and compiles them as well, which means that internally, the compiler handles them all as one entity? If this is true, then it doesn't matter wether the dependencies are moved into the subunits or not. However, even if it doesn't make a difference for the compiler, it can still make a difference for the reader/maintainer of the code. Bye... Dirk