From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 3 Jun 93 16:11:39 GMT 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) Message-ID: List-Id: In article 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.