comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <amosteo@unizar.es>
Subject: Re: Separate Compilation in Programming Languages
Date: Tue, 26 Feb 2008 12:42:18 +0100
Date: 2008-02-26T12:42:18+01:00	[thread overview]
Message-ID: <62ic8uF230f4oU1@mid.individual.net> (raw)
In-Reply-To: <uprulnd6u.fsf@STRIPCAPStelus.net>

Ray Blaak wrote:
> <adaworks@sbcglobal.net> writes:
>> 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.
> 
> This is simply false.
> 
> I am starting to think that *I* don't have the sufficient communication
> skills. There is a fundamental disconnect here.
> 
> Consider this Ada situation:
> 
>   Client C ------> Package P spec
>                      |
>                      |
>                    P body
> 
> When P's spec changes, both C and P's body need to be recompiled.
> 
> When only P's body changes, C is unaffected.
> 
> Consider this Java situation:
> 
>   Client C ------> interface P_Spec
>                      |
>                      |
>                    class P_Body implements P
> 
> When P_Spec changes, both C and P_Body need to be recompiled.
> 
> When only P_Body changes, C is unaffected, P_Spec is unaffected.
> 
> I don't know how else to say it more clearly.
> 
> Note that if anyone is referring to P_Body then they will be affected, but the
> idea is that one takes the care so the clients only use P_Spec. This takes
> effort and discipline, making things less convenient than Ada, but the ability
> to have the separation is there in the Java language.

I'd go farther and say that proper OO programming practice stresses the
fact that  clients must operate on interfaces, and not on particular
implementation classes. Yes, it takes discipline, but it is what is
expected. (Or what I would expect?)

Still, having used both Java and Ada, I find true that Ada, by forcing
always the separation, helps in "indoctrinating" this into programmers.
Specifications in Ada are a blessing.



  parent reply	other threads:[~2008-02-26 11:42 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
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 [this message]
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