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!news.glorb.com!newsfeed2.telusplanet.net!newsfeed.telus.net!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Don't use the "use" clause References: <1132227919.9036.51.camel@sonnenregen> <1132233886.11218.11.camel@sonnenregen> <1w17gk3manse1$.1kcsd6cj5scen$.dlg@40tude.net> <43d5f5cf$1_1@glkas0286.greenlnk.net> <1wq3tkzfwt0bw.1ad4zqlgln451$.dlg@40tude.net> <1138109457.154536.308220@z14g2000cwz.googlegroups.com> From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:3lz8TTnJXKffsiahvV8S6MUXiCg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 24 Jan 2006 18:00:53 -0500 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1138143656 66.159.65.1 (Tue, 24 Jan 2006 18:00:56 EST) NNTP-Posting-Date: Tue, 24 Jan 2006 18:00:56 EST Xref: g2news1.google.com comp.lang.ada:2614 Date: 2006-01-24T18:00:53-05:00 List-Id: brian.b.mcguinness@lmco.com writes: > I do not have a lot of experience with Ada. I am working on a time and > date package that > uses routines from standard Ada packages. At first I tried writing the > code without any "use" clauses but I kept running into problems Next time, bring those "problems" here, or to your mentor; there are better ways of solving them. What compiler are you using? GNAT usually gives excellent error messages in cases like this. > so I finally gave up in frustration and "used" all of the standard > packages I "with"ed. Try adding the use clauses one at a time, in the smallest declaration region you can (in the subprograms, not the package). > I suspect that many other people have the same experience. Yes, that's true. Going overboard with "use" means you don't learn what each package has in it. That's an important part of understanding a program. > Frankly, I see no reason to avoid "use". The whole point of providing > overloading is so that you can have several functions or procedures > with the same name. Yes. "use type" provides that for operators; most coding standards that forbid "use" permit "use type". But I agree that overloading, when used properly, increases the readability of the program. > And I am perfectly happy to ignore any coding guideline that results > in endless frustration without serving any useful purpose. That is not acceptable, if you have agreed to join a project that uses that particular coding standard. Instead, you must work to educate the people on the project, and get the coding standard changed. -- -- Stephe