Re: Separate Compilation in Programming Languages
- From: <adaworks@xxxxxxxxxxxxx>
- Date: Sun, 24 Feb 2008 20:41:37 GMT
"Ray Blaak" <rAYblaaK@xxxxxxxxxxxxxxxxxx> wrote in message
news:ulk5a8zcu.fsf@xxxxxxxxxxxxxxxxxxxxx
<adaworks@xxxxxxxxxxxxx> writes:Absolutely true, and confirmation of my original point. We want to defer
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.
dependencies to the implementation whenever possible so those changes
do not "percolate" throughout the rest of the architecture.
Agree. It certainly does not seem to be true of Java.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.
The deferral to a package body is precisely equivalent to the deferral toJava's notion of separate compilation is not evil. However, it does fall short
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.
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
.
- Follow-Ups:
- Re: Separate Compilation in Programming Languages
- From: Ray Blaak
- Re: Separate Compilation in Programming Languages
- References:
- Separate Compilation in Programming Languages
- From: adaworks
- Re: Separate Compilation in Programming Languages
- From: Robert A Duff
- Re: Separate Compilation in Programming Languages
- From: adaworks
- Re: Separate Compilation in Programming Languages
- From: Robert A Duff
- Re: Separate Compilation in Programming Languages
- From: adaworks
- Re: Separate Compilation in Programming Languages
- From: Ray Blaak
- Re: Separate Compilation in Programming Languages
- From: adaworks
- Re: Separate Compilation in Programming Languages
- From: Ray Blaak
- Separate Compilation in Programming Languages
- Prev by Date: Re: Separate Compilation in Programming Languages
- Next by Date: Re: Separate Compilation in Programming Languages
- Previous by thread: Re: Separate Compilation in Programming Languages
- Next by thread: Re: Separate Compilation in Programming Languages
- Index(es):
Relevant Pages
|
|