comp.lang.ada
 help / color / mirror / Atom feed
From: <adaworks@sbcglobal.net>
Subject: Re: Separate Compilation in Programming Languages
Date: Sun, 24 Feb 2008 20:41:37 GMT
Date: 2008-02-24T20:41:37+00:00	[thread overview]
Message-ID: <5Ekwj.10401$0o7.6822@newssvr13.news.prodigy.net> (raw)
In-Reply-To: ulk5a8zcu.fsf@STRIPCAPStelus.net


"Ray Blaak" <rAYblaaK@STRIPCAPStelus.net> wrote in message 
news:ulk5a8zcu.fsf@STRIPCAPStelus.net...
> <adaworks@sbcglobal.net> writes:
>> When the dependencies are deferred to the implementation module (an Ada
>> package body) a change to a parent specification requires only that body to
>> be recompiled.  When the specification is at the level of another
>> specification, and a change is made to a higher level unit, everything needs
>> to be recompiled.
>
> No, not necessarily. It is quite possible that the only an implementation was
> client of the changed spec, and that the change's effects do not perculate
> out. That is, the change is not transitive.
>
Absolutely true, and confirmation of my original point.  We want to defer
dependencies to the implementation whenever possible so those changes
do not "percolate" throughout the rest of the architecture.

>> I think this is as true of Java as it is of Ada.  The only difference is
>> that Ada allows one to defer the dependency to the package body.  This does
>> not seem to be true of Java.
>
Agree.  It certainly does not seem to be true of Java.

> The deferral to a package body is precisely equivalent to the deferral to
> another implementation class. The implementation class is (or can be) private,
> hidden in exactly the same way the body of a package is.
>
> That is what allows Java interfaces to serve as equivalent controls for
> separate compilation as Ada's package bodies. Mind you, they're not
> necessarily as convenient, mind you, but I am objecting only to the notion
> that Java does not support separate compilation.
>
Java's notion of separate compilation is not evil.  However, it does fall short
of what can be done in Ada.   Interfaces, while such a good idea in Java that
they have been adopted by Ada, do not solve the dependency issue and do
not provide the capabilities for architectural integrity possible in Ada.  An
implementation of an Interface (in Java) is still tightly bound to its 
specification,
and any change of that implementation will carry forward.  It is true that the
Interface specification remains unchanged, and that is a good thing.  However,
if any part of the Interface specification changes, every other unit dependent
on that specification will also have to be recompiled.   In the Ada model, where
I defer the dependency on that Interface to the body of the dependent package,
I need not recompile the specification of the dependent package.   Rather,
I can compile only the body, leaving the rest of my architecture intact.

I'm not sure why this is such a difficult idea.  It is probably because I am not
expressing it with sufficient skill.

Richard Riehle 





  reply	other threads:[~2008-02-24 20:41 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
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 [this message]
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