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-03 22:56:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!uio.no!newsfeed.song.fi!nntp.inet.fi!central.inet.fi!inet.fi!read3.inet.fi.POSTED!53ab2750!not-for-mail From: "Anders Wirzenius" Newsgroups: comp.lang.ada References: <5463bc76.0212030344.712c30aa@posting.google.com> <3DECAA3A.F3E7BA90@earthlink.net> Subject: Re: Style question: deep inheritance X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <7GhH9.54$wk5.1@read3.inet.fi> Date: Wed, 04 Dec 2002 06:56:03 GMT NNTP-Posting-Host: 194.251.142.2 X-Complaints-To: abuse@inet.fi X-Trace: read3.inet.fi 1038984963 194.251.142.2 (Wed, 04 Dec 2002 08:56:03 EET) NNTP-Posting-Date: Wed, 04 Dec 2002 08:56:03 EET Organization: Sonera corp Internet services Xref: archiver1.google.com comp.lang.ada:31402 Date: 2002-12-04T06:56:03+00:00 List-Id: "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. Anders