From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,59e7405b37921f3e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-21 12:43:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-pas-nf2!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3EF4B565.6070907@spam.com> From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A good way to name instantiated children? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 21 Jun 2003 19:43:54 GMT NNTP-Posting-Host: 63.183.232.102 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1056224634 63.183.232.102 (Sat, 21 Jun 2003 12:43:54 PDT) NNTP-Posting-Date: Sat, 21 Jun 2003 12:43:54 PDT Xref: archiver1.google.com comp.lang.ada:39539 Date: 2003-06-21T19:43:54+00:00 List-Id: Simon Wright wrote: > Stephen Leake writes: > >>I solve this by prefixing Gen_ to the generic package names: > > I've used the suffix _G (still in >1 mind about it, though!) The name of generic should relate to the thing it implements; the name of the instantiation, the application's need for such a thing. Coming up with good names for instantiations is an important part of making the S/W as self-documenting as possible. As an example, the data structures in the PragmAda Reusable Components have generic procedures named Iterate. Instantiations should have names like Put_All, Sum, and so on, indicating what the application achieves by visiting each element in the structure. An instantiation named Iterate would not be properly descriptive. If you are going to repeat "generic" in the name, a suffix is better than a prefix. Psychologically, the 1st few characters of identifiers are the most important in distinguishing them. If you have a lot of identifiers starting with the same thing, it makes your code harder to read. This applies to A_ and The_ on parameter names as well as to Gen_ on generics. -- Jeff Carter "If a sperm is wasted, God gets quite irate." Monty Python's the Meaning of Life