comp.lang.ada
 help / color / mirror / Atom feed
From: dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!noc.near.net !inmet!pes@ucbvax.Berkeley.EDU  (Paul Slonaker)
Subject: Re: Ada name space (was: Re: good software engineering)
Date: 3 Jun 93 16:11:39 GMT	[thread overview]
Message-ID: <C81znG.6wH@inmet.camb.inmet.com> (raw)

In article <dewar.739044733@schonberg> dewar@schonberg.NYU.EDU (Robert Dewar) 
writes:

>One of the problems in choosing names for Ada packages that are to be shared
>is that the naming style that one wants is indeed very different depending
>on whether or not you expect to use qualification.

In article <1993Jun3.080544.29388@sei.cmu.edu> firth@sei.cmu.edu (Robert Firth)
writes:

>I confess I see no good reason to compromise, and one good reason not
>to: any compromise will satisfy neither party and yield a product whose
>nomenclature is confusing and inconsistent.
>
>Make a choice and stick to it.  The Ada 'renames' facility is there
>precisely so as to provide relief for users who find that choice hard
>to live with.

Another related name-space problem arises if one wants to include, in the
names of library units, some reference to the static hierarchy.  For
example, one may require that the name of every unit begin with a two or
three-letter abbreviation of the CSC in which that unit belongs.  This has
certain advantages, among them:  one may more easily manipulate the source
code files of all the units in a CSC as a group; one is given some
contextual information about a unit given only its name; and this helps to
reduce the probability of discovering, during integration, that two units
have the same name.  However, this practise does not make it easier to come
up with natural-sounding names.  (It also does not make reuse easier, but
that's a separate issue.)

One solution that I've used is to rename a with'd library unit with either
a shorter, descriptive name or an abbreviation.  I only do this in the
body of the withing unit in order to avoid declaring a new visible reference to
the with'd unit.  That is, I would not do the following:

   with A_Long_And_Painfully_Descriptive_Name;
   package B is
      package A renames A_Long_And_Painfully_Descriptive_Name;
      procedure P( O : in out A.Data_Type );
   end B;

because any unit that with's B can then reference A without withing it.

Paul Slonaker
Intermetrics, Inc.

             reply	other threads:[~1993-06-03 16:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-06-03 16:11 dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!noc.near.net [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-06-07 15:34 Ada name space (was: Re: good software engineering) David Emery
1993-06-03 12:05 agate!howland.reston.ans.net!europa.eng.gtefsd.com!fs7.ece.cmu.edu!news.s
1993-06-02 18:12 Robert Dewar
replies disabled

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