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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3dbf2f325f33ce35 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Elimination of "use" clauses Date: 1999/07/14 Message-ID: <378D056F.78D1AD10@averstar.com>#1/1 X-Deja-AN: 501091729 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <377B5807.88B875E0@cs.york.ac.uk> <7lh74s$v36$1@nnrp1.deja.com> <377CE178.6C15F543@hso.link.com> <7ljbsu$ni7$1@nnrp1.deja.com> <7ltl2q$mog$1@nnrp1.deja.com> <3784DC54.6463EDCA@decada.zko.dec.com> <7m3jfk$sud$1@nnrp1.deja.com> <3785EC89.58768067@decada.zko.dec.com> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-07-14T00:00:00+00:00 List-Id: Michael F. Yoder wrote: > ... > This simply isn't so in my experience. It takes at most one or two > readings of the renamings to internalize them. If you are aware of the > method, you treat the renamings as an extension of the context clause; > and of course you should habitually read the context clause of a unit > before reading the unit. Even if you aren't aware of the method, you > should read the global declarations at the top of a unit body. For what it is worth, we have used the package renaming approach in our all of our tools since 1980. Probably about a million lines of code all told, counting the AIE and derivatives thereof. We certainly tried to have project-wide agreement on the official short name for every package. Even when there were local variations, it was still quite manageable. (In Ada 95 you have an option of actually putting the official short names into the library using library-unit renames, though I'm not sure whether it is a good idea to take advantage of that for this purpose.) In any case, we quite rapidly reached the point that we all knew the short names by heart, and it significantly improved the signal-to-noise ratio compared to using full package names everywhere, and minimized the mystery associated with using multiple use clauses. Of course, as in all of these things, your mileage may vary. But we at least have gotten very good mileage out of the package rename approach, and I would suggest other shops give it a try to see whether it solves their problems. Combined with "use type" for operators, it has worked even better for us in Ada 95. -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA