comp.lang.ada
 help / color / mirror / Atom feed
From: stt@spock.camb.inmet.com (Tucker Taft)
Subject: Re: An observation of Ada (may offend)
Date: Fri, 24 Mar 1995 21:33:14 GMT
Date: 1995-03-24T21:33:14+00:00	[thread overview]
Message-ID: <D5yrvF.E1J@inmet.camb.inmet.com> (raw)
In-Reply-To: 3ku7us$117l@info4.rus.uni-stuttgart.de

Peter Hermann (ucaa2385@alpha1.csv.ica.uni-stuttgart.de) wrote:

[Various proposals relating to limiting the use of child units.]

: I would not recommend that whole direction because
: one of the strengths of the child feature is exactly the fact,
: that the parent need not be touched further on.
: For Ada200X, the abs private part may be more convenient (if any)
: but, imho, this overburdening of the language is superfluous.

Here, here.

Child units are a namespace structuring mechanism.  A fundamental 
characteristic of this structuring mechanism is that the spec of the 
parent does not depend on the children.  Furthermore, if a child unit 
is not mentioned in some "with" clause, it is as though it doesn't 
exist at all, and will not be included in the program.  Hence, adding 
an "unwanted" child has no effect on any program that does not 
explicitly mention that child in some with clause.

Adding a child is simply extending the interface of the abstraction
represented by the tree of library units.  Without child units,
this is done by entering a new version of a package into a library
after adding more subprograms to the package.  With child units, you 
can accomplish the same thing by entering the new child into 
the library.  In both cases, if you want to control access
or update to the library, then you need to use the O/S or the Ada compiler
to do it.  

Access control is not a language issue, it is a tool or O/S issue.

Note that using child units is actually *safer* than the "old" approach
where one simply edited the package that represented the entire abstraction,
since as mentioned above, the only clients that can possibly be affected
are those that explicitly add a "with" clause for the new child.
With the "old" approach where someone goes in and adds or changes stuff
in the original package, it is much less obvious which clients might
be affected.

So a pragma that lists the names of child units is the moral equivalent
to a comment at the top of a package that lists the names of all of 
the subprograms in the package.  It proves nothing, and simply creates 
busy work during maintenance, since it must be updated every time
you want to add a new child (and don't tell me somehow that your tools can
prevent me from entering a new version for the parent package, but
they can't prevent me from adding a new child).  Some kinds of redundancy
are useful, but these kinds of redundant lists are a waste of energy.

If you want a list of the children, get a list from the program library
manager (a.k.a "list directory" on GNAT).  Similarly, if you want
a list of the subprograms in a package, use "grep."  If you want to
lock out unauthorized additions or changes to *your* program library, 
use "chmod" (or whatever).

This whole thing reminds me of attempts to add silly amendments
to the US constitution ;-).

: --
: Peter Hermann  Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de
: Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen
: Team Ada: "C'mon people let the world begin" (Paul McCartney)

-Tucker Taft   stt@inmet.com
Intermetrics, Inc.



  parent reply	other threads:[~1995-03-24 21:33 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-17  9:27 An observation of Ada (may offend) R.A.L Williams
1995-03-17 15:23 ` Robb Nebbe
1995-03-17 17:08 ` Norman H. Cohen
1995-03-20  3:23   ` S. Tucker Taft
1995-03-20 10:13   ` Robb Nebbe
1995-03-21 21:05     ` Robert Dewar
1995-03-20 16:15   ` Robert I. Eachus
1995-03-21 19:47     ` Norman H. Cohen
1995-03-22  1:28       ` David Weller
1995-03-23  5:47       ` Robert Dewar
1995-03-23 16:38         ` Robert I. Eachus
1995-03-24 10:46           ` Peter Hermann
1995-03-24 16:52             ` David Weller
1995-03-26  4:03               ` Robert Dewar
1995-03-24 21:33             ` Tucker Taft [this message]
1995-03-27  9:59             ` Child packages Robb Nebbe
1995-03-28  1:11               ` Keith Thompson
1995-03-28 11:54                 ` Keith Thompson
1995-03-27 18:58             ` An observation of Ada (may offend) Mark A Biggar
1995-03-24 19:45           ` Garlington KE
1995-03-27 19:58             ` Robert I. Eachus
1995-03-28 16:29               ` Garlington KE
1995-03-28 19:30                 ` Robert I. Eachus
1995-03-28 22:37                   ` Garlington KE
1995-03-29  8:31                   ` Robb Nebbe
1995-03-25 17:58           ` Robert Dewar
1995-03-26  6:20             ` R_Tim_Coslet
1995-03-27 20:38               ` Robert I. Eachus
1995-03-26  3:50           ` celier
     [not found]           ` <3l1lkq$pm6@gnat.csn <3l2o9a$3a1@infomatch.com>
1995-03-27 23:16             ` Robert Dewar
1995-03-23 18:05       ` John DiCamillo
1995-03-17 23:01 ` Larry Kilgallen, LJK Software
1995-03-18 12:41 ` Tucker Taft
1995-03-22 16:50 ` Renaud HEBERT
1995-03-23 23:23   ` John Volan
1995-03-24  0:38   ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1995-03-30  0:00 R.A.L Williams
1995-04-03  0:00 ` Norman H. Cohen
1995-03-29  0:00 R.A.L Williams
1995-03-27 10:38 R.A.L Williams
1995-03-30  3:14 ` Michael D. Griffin
1995-03-30  0:00   ` David Weller
1995-04-04  0:00   ` Brian Rogoff
1995-04-04  0:00   ` Jack Beidler
1995-03-27 10:28 R.A.L Williams
1995-03-27  0:00 ` Norman H. Cohen
1995-04-04  0:00   ` Robert Dewar
1995-03-28 17:07 ` Larry Kilgallen, LJK Software
1995-03-12 23:39 Matt Bruce
1995-03-13  0:34 ` David Weller
1995-03-14  4:49 ` Vladimir Vukicevic
1995-03-17 17:00   ` Michael Feldman
1995-03-17 13:09     ` Fred J. McCall
1995-03-18 20:34       ` Michael Feldman
1995-03-19 22:20         ` Robert Dewar
1995-03-20 17:19           ` Michael Feldman
1995-03-21 21:02             ` Robert Dewar
1995-03-21 23:01             ` Kevin F. Quinn
1995-03-22 12:43             ` Mike Meier
1995-03-20 20:38           ` Kevin F. Quinn
1995-03-21  3:02         ` Michael M. Bishop
1995-03-20  9:31       ` Robb Nebbe
1995-03-20 20:16       ` Mats Weber
1995-03-22 19:44       ` Stephen McNeill
1995-03-28 14:48       ` Wes Groleau
1995-03-22 17:20     ` Richard G. Hash
replies disabled

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