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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3cd94a799504cebd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-16 07:06:48 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Small question concerning use Date: Tue, 16 Oct 2001 09:54:13 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9qhe68$8fq$1@nh.pace.co.uk> References: <19130ae.0110151428.65937d5b@posting.google.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1003240456 8698 136.170.200.133 (16 Oct 2001 13:54:16 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 16 Oct 2001 13:54:16 GMT 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 Xref: archiver1.google.com comp.lang.ada:14676 Date: 2001-10-16T13:54:16+00:00 List-Id: This discussion shows up here quite often. Perhaps something should be in the FAQ? There is no overall concensus on the issue of "use" clauses. You will find advantages and disadvantages on either side of the issue. Generally, there is some concensus that they should be avoided until such time as it starts to make what you are doing more clear to have the use clause. Start with no use clause. If you find that you are doing silly things like "X := Some_Package."<=" (A, B);" then back off a little and try the "use type" to make the operations visible. If your code is getting really cluttered with Long.Confusing.Dotted.Names then you might back off some more. Try to restrict the use clause to just the scope that needs it to make things more clear. OTOH, if you have a use clause for every package you "with" you are really no worse off than you would be in most other languages and you can always disambiguate whatever you need to with the dotted notation. Code clarity? Many modern Ada-oriented editors will help you locate the exact definition of a thing if/when you get confused - unless the code doesn't yet compile! :-) As you develop more code in Ada, you will probably develop a sense of where to draw the line such that it works well for you. If you're on a joint project with others, establish & follow some project guidelines on this so that you are at least consistent. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Eric Merritt" wrote in message news:19130ae.0110151428.65937d5b@posting.google.com... > Hello everyone, > > I am fairly new to Ada, though I already love the language, and I have > a small question concerning the 'use' keyword. Many books and quite a > few postings to this group say not to use it at all, even the style > guide is fairly adamant about avoiding it. Yet, in many packages I see > it used frequently. Is there a set standard for when to use it and > when not to use it? I would just as soon not use it at all except some > packages names get really (really) long. Ok, lets say you don't use > it, is it then acceptable to use 'rename ' to shorten long package > names. Which is the more acceptable? > > Thank you for your time, > Eric