comp.lang.ada
 help / color / mirror / Atom feed
From: <adaworks@sbcglobal.net>
Subject: Re: Separate Compilation in Programming Languages
Date: Mon, 25 Feb 2008 07:06:35 GMT
Date: 2008-02-25T07:06:35+00:00	[thread overview]
Message-ID: <%Ntwj.12620$Ch6.11402@newssvr11.news.prodigy.net> (raw)
In-Reply-To: uy799dama.fsf@STRIPCAPStelus.net


"Ray Blaak" <rAYblaaK@STRIPCAPStelus.net> wrote in message 
news:uy799dama.fsf@STRIPCAPStelus.net...
> <adaworks@sbcglobal.net> writes:
>
>> An implementation of an Interface (in Java) is still tightly bound to
>> its specification, and any change of that implementation will carry forward.
>
> But of course. And that is exactly analogous a change to an Ada package spec
> impacting the package body.
>
>> 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.
>
> Again, exactly the same as changing an Ada package spec.
>
Only when dependencies are at the specification level.  But, in Ada we
can defer the dependency to the package body.  In Java you cannot
defer that dependency.  A dependent unit, when the specification
changes is combined with its implementation.   Therefore, every dependent
specification must also be compiled.   As noted below, we can defer
the dependency in Ada to the package body.  There is nothing analogous
to this in Java.

>> 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.
>
> Recompiling a file does not imply the need to imply client files if the
> public signatures have not changed. Most IDEs can handle this.
>
Exactly my point.  If the public signatures do not change, there is no
need for recompilation.  When the public signature does change, the
entire dependent architecture goes out of phase.  If, however, that public
signature change is isolated to the the implementation files, the separately
compiled package body (as it is in Ada) the architecture remains intact.

In Java, all public signatures, including implementations, are dependent on
parent public signatures.  There is no way to separate them.   When one
changes, everything dependent on that one change is also changed.  In
Ada, we move the dependency to the pacakge body so changes to a
specification has no effect on the Ada specification, thereby preserving
architectural integrity.   This is not possible, as nearly as I can tell from
all the examples given to me so far, in Java.

> Also, recompiling an implementation class will not cause a recompilation of
> the interface clients at all, since they do not even (necessarily) see the
> implemetation in the first place.
>
> Again, exactly analogous to an Ada package body needing to be
> recompiled. Ada's separation of spec and body is what allows you to do this. A
> Java interface and its implementation class is an analogous separation.
>
>> I'm not sure why this is such a difficult idea.  It is probably because I am
>> not expressing it with sufficient skill.
>
> Well, as politely as possible, I submit that it is not about the skill, but
> that I think you are mistaken.
>
Perhaps.  But I still don't see how one can defer the dependency of a
Java signature to the implementation of the Java class and prevent
the need for recompiling the entire architecture when the signature of
a parent class changes.   The ripple effect through the entire chain
of dependencies when one of those signatures changes is almost
certain to be affected by such a change of signature.   If Java can
somehow accomodate that change automatically, it must be some
kind of magic that is not immediately apparent, even to the Java
developers I know.

Richard Riehle 





  reply	other threads:[~2008-02-25  7:06 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
2008-02-25  2:37                 ` Ray Blaak
2008-02-25  7:06                   ` adaworks [this message]
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