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-Thread: 103376,2a687662f09731bb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Don't use the "use" clause References: <1132227919.9036.51.camel@sonnenregen> <1132233886.11218.11.camel@sonnenregen> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 23 Jan 2006 20:21:06 GMT NNTP-Posting-Host: 67.3.180.58 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1138047666 67.3.180.58 (Mon, 23 Jan 2006 12:21:06 PST) NNTP-Posting-Date: Mon, 23 Jan 2006 12:21:06 PST Xref: g2news1.google.com comp.lang.ada:2594 Date: 2006-01-23T20:21:06+00:00 List-Id: adaworks@sbcglobal.net wrote: > "Anonymous Coward" wrote in message > news:slrndnv9qv.1r7.bogus_addy@tango.mindfuq.org... > >>I agree. I personally take it an extreme step further, and never use >>use clauses anywhere. They shouldn't even be in the language. Every >>Ada project I've worked on that had a coding standard banned the use >>clause, and rightly so. > > Three features of the language, all useful at times, are the visibility clause > (use) and the renames option, and the goto. Even though all are > potentially problematic, they are also useful at times. Right. The OP might want to use SPARK, which does not have use clauses. > Visibility is one of the most least understood concepts in Ada. It drives new > Ada programmers nuts. Experience Ada programmers learn to appreciate > its power and find it useful. The also know when visibility clauses are > appropriate and when they are not. This is not, as someone else mentioned, > simply a matter of taste. It is not just a matter of style. There's also a question of judgment. The packages in the core language definition and the standard library (Ada.*) should be familiar to anyone reading Ada code; using these packages should not impact readability. A project may have a its own standard library in addition to these, that should be familiar to anyone working on the project, and a similar argument applies to these. A package used in a single subsystem of a large project is a different creature and is probably not a good candidate for use. -- Jeff Carter "Your mother was a hamster and your father smelt of elderberries." Monty Python & the Holy Grail 06