comp.lang.ada
 help / color / mirror / Atom feed
From: <adaworks@sbcglobal.net>
Subject: Re: Separate Compilation in Programming Languages
Date: Fri, 22 Feb 2008 16:12:12 -0800
Date: 2008-02-22T16:12:12-08:00	[thread overview]
Message-ID: <7xJvj.7420$Ru4.4246@newssvr19.news.prodigy.net> (raw)
In-Reply-To: wccr6f4y94q.fsf@shell01.TheWorld.com


"Robert A Duff" <bobduff@shell01.TheWorld.com> 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.





  reply	other threads:[~2008-02-23  0:12 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 17:35 Separate Compilation in Programming Languages adaworks
2008-02-22 17:52 ` Dirk Heinrichs
2008-02-23  0:23   ` adaworks
2008-02-22 18:10 ` Ray Blaak
2008-02-22 23:53   ` adaworks
2008-02-23  1:40     ` Ray Blaak
2008-02-23  7:29       ` adaworks
2008-02-23 18:42         ` Ray Blaak
2008-02-22 18:18 ` Niklas Holsti
2008-02-23  0:14   ` adaworks
2008-02-23  7:23     ` Niklas Holsti
2008-02-23  7:31       ` Niklas Holsti
2008-02-23 16:00         ` adaworks
2008-02-23 12:27     ` Georg Bauhaus
2008-02-23 12:37   ` Dirk Heinrichs
2008-02-23 13:03     ` Niklas Holsti
2008-02-22 19:11 ` Dmitry A. Kazakov
2008-02-23  0:16   ` adaworks
2008-02-22 19:33 ` Larry Kilgallen
2008-02-22 20:47 ` Simon Wright
2008-02-22 21:27 ` Robert A Duff
2008-02-23  0:12   ` adaworks [this message]
2008-02-23 10:28     ` framefritti
2008-02-23 12:45     ` Dirk Heinrichs
2008-02-23 15:16     ` Robert A Duff
2008-02-23 16:47       ` adaworks
2008-02-23 18:47         ` Ray Blaak
2008-02-24  7:40           ` adaworks
2008-02-24  9:42             ` Ray Blaak
2008-02-24 20:41               ` adaworks
2008-02-25  2:37                 ` Ray Blaak
2008-02-25  7:06                   ` adaworks
2008-02-25 13:12                     ` Robert A Duff
2008-02-25 17:44                     ` Ray Blaak
2008-02-25 22:16                       ` Ray Blaak
2008-02-26  5:10                         ` John W. Kennedy
2008-02-26 19:08                           ` Ray Blaak
2008-02-26  7:11                         ` adaworks
2008-02-26 13:38                           ` Stephen Leake
2008-02-26 14:56                             ` adaworks
2008-02-26 19:15                               ` Ray Blaak
2008-02-26 19:13                           ` Ray Blaak
2008-02-26 21:25                             ` Ray Blaak
2008-02-27  1:15                               ` Robert A Duff
2008-02-26  7:06                       ` adaworks
2008-02-26 11:42                       ` Alex R. Mosteo
2008-02-26 15:05                         ` adaworks
2008-02-26 15:15                           ` Alex R. Mosteo
2008-02-24 17:26             ` Robert A Duff
2008-02-23 20:46         ` Robert A Duff
2008-02-24  7:31           ` adaworks
2008-02-24 17:20             ` Robert A Duff
2008-02-24 20:33               ` adaworks
2008-02-25  1:07                 ` Robert A Duff
2008-02-26  7:29                   ` adaworks
2008-02-26 19:22                     ` Ray Blaak
2008-02-27  1:58                       ` adaworks
2008-02-27 20:34                         ` Ray Blaak
2008-02-27 22:31                           ` Robert A Duff
2008-02-27 23:35                             ` Ray Blaak
2008-02-28  0:19                               ` Randy Brukardt
2008-02-28  9:18                               ` Georg Bauhaus
2008-02-29  5:57                             ` adaworks
2008-02-29  6:04                               ` Ray Blaak
2008-02-29 10:48                                 ` Alex R. Mosteo
2008-02-29 17:05                                 ` adaworks
2008-02-29 18:33                                   ` Ray Blaak
2008-02-29  6:10                           ` adaworks
2008-02-22 22:16 ` Jeffrey R. Carter
2008-02-23 13:44 ` Brian Drummond
2008-02-23 17:19   ` adaworks
2008-02-25  7:53 ` Jean-Pierre Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox