comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: packages and private parts
Date: 1997/02/16
Date: 1997-02-16T00:00:00+00:00	[thread overview]
Message-ID: <E5pK4n.I0y.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 3304E195.275C@watson.ibm.com


Norman H. Cohen (ncohen@watson.ibm.com) wrote:
: ... Yes, I know, the rule prohibiting Random_Dice
: from having noninstance children ensures that a package whose name is
: not of the form Ada.Numerics.Discrete_Random.* does not have visibility
: into the private part of instances of Ada.Numerics.Discrete_Random.  But
: that's a rather obscure consideration, of interest primarily to us
: language lawyers, and probably the farthest thing from the mind of the
: programmer who writes the code above and finds that it won't compile.

The fact that only code in the subsystem "Ada.Numerics.Discrete_Random.*"
has visibility of the private declarations of Ada.Numerics.Discrete_Random
is essential to the child package concept.  It means that when
you alter the private declarations, you can have confidence that only
code in this subsystem needs to be examined.  To me, the whole point
of information hiding/encapsulation is to be able to find easily all of the
code that may need to be fixed when an implementation detail is changed.

If you allow child packages of any instantiation to have such visibility,
then you have a potentially unbounded amount of code to find and fix, much
of which will not be available to the maintainers of the generic subsystem.

: Norman H. Cohen
: mailto:ncohen@watson.ibm.com
: http://www.research.ibm.com/people/n/ncohen

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




  reply	other threads:[~1997-02-16  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <32F1A8AD.6D6C@ehs.ericsson.se>
     [not found] ` <E4wBxD.Jtp.0.-s@inmet.camb.inmet.com>
     [not found]   ` <32FA579B.2496@watson.ibm.com>
     [not found]     ` <E58onv.4zC@world.std.com>
1997-02-07  0:00       ` packages and private parts Mats Weber
1997-02-07  0:00       ` Mats Weber
1997-02-14  0:00       ` Norman H. Cohen
1997-02-16  0:00         ` Tucker Taft [this message]
1997-02-17  0:00           ` Norman H. Cohen
     [not found] <32F170C8.6A88F208@cam.org>
     [not found] ` <dewar.854838063@merv>
     [not found]   ` <32FA4C67.48D9@watson.ibm.com>
     [not found]     ` <32FB27FF.794BDF32@innocon.com>
1997-02-07  0:00       ` Tucker Taft
1997-02-08  0:00         ` Ken Garlington
     [not found]       ` <dewar.855326480@merv>
1997-02-10  0:00         ` Jeff Carter
1997-02-10  0:00           ` Larry Kilgallen
1997-02-10  0:00           ` Robert Dewar
     [not found]     ` <dewar.855276290@merv>
1997-02-07  0:00       ` Norman H. Cohen
1997-02-07  0:00         ` Robert Dewar
1997-02-14  0:00           ` Norman H. Cohen
1997-02-15  0:00             ` Robert Dewar
1997-02-10  0:00   ` Jon S Anthony
replies disabled

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