comp.lang.ada
 help / color / mirror / Atom feed
From: czgrr <czgrr@my-deja.com>
Subject: Re: Elimination of "use" clauses
Date: 1999/07/01
Date: 1999-07-01T00:00:00+00:00	[thread overview]
Message-ID: <7lfvbk$fhh$1@nnrp1.deja.com> (raw)
In-Reply-To: 377B5807.88B875E0@cs.york.ac.uk

In article <377B5807.88B875E0@cs.york.ac.uk>,
  Neil.Audsley@cs.york.ac.uk wrote:
> Ideally, we would like to eliminate "use" clauses, necessitating the
> replacement of each procedure call X by PackageName.X instead.
> Is there a tool that does this?

I don't know about a tool to do it automatically, but it would seem
that the easiest way to do it manually, if you have to, is to remove
one "use", recompile all and see what fails. Add in "package_name."s
until everything compiles again, and repeat for all "use"s.

If you are using a compiler which has an "Show definition of..."
operation (like ObjectAda, for example), you can use that to find the
package that a function call is in, but this may be more tedious than
getting the compiler to find them all for you.

P.S. Watch out for operators. Having added all the "package_name."s, it
sometimes makes for better readability if you re-introduce the "use"
(globally or in specific routines) solely for the purpose of accessing
operators. Remember to comment it as such.

P.P.S. Totally my opinion here, and I'm sure that a discussion of some
sort will ensue as a result of this, but I believe that if one package
is heavily accessed in another, then that normally justifies having a
"use". Similarly, if there is a globally used, low-enough-level package
(like one for a program-wide set of base declarations), then I "use"
that package everywhere that I "with" it as standard. But it's up to
you.

Cheers,
czgrr

--
No email, please - reply to the newsgroup.
My opinions are not necessarily those of my
employer.
Use any suggestions at your own risk.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  parent reply	other threads:[~1999-07-01  0:00 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Elimination of "use" clauses Dr. Neil C. Audsley
1999-07-01  0:00 ` Joe Wisniewski
1999-07-01  0:00 ` czgrr [this message]
1999-07-01  0:00   ` Ted Dennison
1999-07-02  0:00     ` czgrr
1999-07-02  0:00       ` Ted Dennison
1999-07-01  0:00 ` Samuel T. Harris
1999-07-02  0:00 ` Robert Dewar
1999-07-02  0:00   ` Ed Falis
1999-07-03  0:00     ` Joe Wisniewski
1999-07-03  0:00       ` Keith Thompson
1999-07-03  0:00       ` Ed Falis
1999-07-13  0:00     ` Peter Amey
1999-07-02  0:00   ` Ted Dennison
1999-07-02  0:00     ` Stephen Leake
1999-07-02  0:00     ` Robert Dewar
     [not found]       ` <7ltus1$ah1@dfw-ixnews19.ix.netcom.com>
1999-07-13  0:00         ` Robert A Duff
1999-07-18  0:00           ` Richard D Riehle
1999-07-18  0:00             ` Dale Stanbrough
1999-07-20  0:00               ` David Kristola
1999-07-20  0:00               ` Richard D Riehle
1999-07-19  0:00                 ` Brian Rogoff
1999-07-20  0:00                   ` Robert Dewar
1999-07-20  0:00                     ` Brian Rogoff
1999-07-21  0:00                       ` Ted Dennison
1999-07-21  0:00                         ` Robert A Duff
1999-07-21  0:00                         ` Robert Dewar
1999-07-21  0:00                       ` Robert Dewar
1999-07-21  0:00                         ` Brian Rogoff
1999-07-22  0:00                           ` Robert Dewar
1999-07-22  0:00                             ` Brian Rogoff
1999-07-22  0:00                           ` Robert Dewar
1999-07-22  0:00                             ` Brian Rogoff
1999-07-21  0:00                     ` Robert A Duff
1999-07-21  0:00                       ` Michael F. Yoder
1999-07-21  0:00                         ` Robert A Duff
1999-07-23  0:00                 ` Tucker Taft
1999-08-03  0:00                   ` Richard D Riehle
1999-07-18  0:00             ` jerry
1999-07-19  0:00               ` Vladimir Olensky
1999-07-20  0:00               ` Richard D Riehle
1999-07-20  0:00                 ` jerry
1999-07-20  0:00                 ` Opaque Types (was Elimination of "use" clauses) David C. Hoos, Sr.
1999-07-19  0:00             ` Elimination of "use" clauses Ted Dennison
1999-07-19  0:00               ` Tucker Taft
1999-07-19  0:00                 ` Ted Dennison
1999-07-02  0:00     ` Ed Falis
1999-07-02  0:00   ` Samuel T. Harris
1999-07-02  0:00     ` Robert Dewar
1999-07-08  0:00       ` R. Tim Coslet
1999-07-09  0:00         ` Robert Dewar
1999-07-09  0:00           ` tmoran
     [not found]       ` <7ltl2q$mog$1@nnrp1.deja.com>
1999-07-08  0:00         ` Michael F. Yoder
1999-07-09  0:00           ` Richard D Riehle
1999-07-09  0:00             ` Michael F. Yoder
1999-07-09  0:00             ` Marin David Condic
1999-07-09  0:00           ` Robert Dewar
1999-07-09  0:00             ` Michael F. Yoder
1999-07-14  0:00               ` Tucker Taft
1999-07-09  0:00             ` Dale Stanbrough
1999-07-12  0:00               ` Robert Dewar
1999-07-12  0:00                 ` Ted Dennison
1999-07-10  0:00             ` Simon Wright
1999-07-12  0:00               ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox