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,WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4cd85c8656c704b6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-04 04:42:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!wn11feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3DEDF893.52674CD6@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Style question: deep inheritance References: <5463bc76.0212030344.712c30aa@posting.google.com> <3DECAA3A.F3E7BA90@earthlink.net> <7GhH9.54$wk5.1@read3.inet.fi> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 04 Dec 2002 12:41:48 GMT NNTP-Posting-Host: 63.190.208.251 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1039005708 63.190.208.251 (Wed, 04 Dec 2002 04:41:48 PST) NNTP-Posting-Date: Wed, 04 Dec 2002 04:41:48 PST Xref: archiver1.google.com comp.lang.ada:31412 Date: 2002-12-04T12:41:48+00:00 List-Id: Anders Wirzenius wrote: > > "Marc A. Criley" wrote in message > news:3DECAA3A.F3E7BA90@earthlink.net... > > The technique I've been using lately to good effect is to employ "use" > > clauses that eliminate all but the "bottom" package. E.g., for > > SAM.Entities.Things.Portals, I'd have a "use SAM.Entities.Things;", so > > then Portals components get referenced as "Portals.Teleport", for > > instance. > > > > This doesn't help with long filenames, but you can use gnatkr to aid > > cutting down the length of names. > > > > Marc A. Criley > > Quadrus Corporation > > www.quadruscorp.com > > "All but the ""bottom"" package" is an excellent technique! Why have I not > discovered that myself ;-( > > A small 2 cents comment which, again, is borrowed from another (at least J-P > Rosen): > The more natural place for the use clause is in the code right before it is > needed, not at the beginning of the package as a tail to the with clause. > like: > with SAM.Entities.Things; > ... > begin > ... > code not using SAM.Entities.Things > ... > define > use SAM.Entities.Things; > begin > Portals.Teleport... > end; > ... > code > ... > end; > > Thanks for "allowing" to use your code, Marc. Glad to be of help, and though I didn't mention it, I too also tend to localize most use clauses inside the procedures where they're needed, rather than placing them in the context clause list. Marc