comp.lang.ada
 help / color / mirror / Atom feed
From: vilot@wanginst.UUCP (Michael Vilot)
Subject: Re: Preferred style of use-clauses
Date: Wed, 13-Aug-86 17:11:30 EDT	[thread overview]
Date: Wed Aug 13 17:11:30 1986
Message-ID: <169@wanginst.UUCP> (raw)
In-Reply-To: 2938@sdcrdcf.UUCP

In article <2938@sdcrdcf.UUCP> lwall@sdcrdcf.UUCP (Larry Wall) writes:
>
>If you are in a situation where the types of your subprogram arguments are
>clear, and your abstract types are all nicely confined to packages so that
>you don't rely on hiding mechanisms of dubious value, I see no reason to
>avoid the use of multiple USE clauses, even in large projects, even where
>it results in overloading.  

Consider  one more reason to  have USE  clauses:  changing a package's
imported environment  explicitly.  Suppose   you  have  built a   test
version of a system which instruments some features you are interested
in.  Now,  suppose you have  to get the  same  system into "production
shape" (i.e. faster and/or smaller), and you're not  interested in the
instrumentation.  It may be far easier to go from:

with Heavily_Instrumented_Package; use Heavily_Instrumented_Package;
procedure The_System is
begin
	Do_Interesting_Stuff;
end;

	... to:

with Simpler_and_Faster_Package; use Simpler_and_Faster_Package;
procedure The_System is
begin
	Do_Interesting_Stuff;
end;

	... than to replace all occurrences of the fully qualified
names.

	Of course, in a well-run project, the need for two versions is
all seen in advance, and the change should "never be needed" :-)

      reply	other threads:[~1986-08-13 21:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-08-02 13:01 Preferred style of use-clauses "David S. Bakin"
1986-08-05 17:15 ` alden%jade
1986-08-06 20:45   ` Larry Wall
1986-08-13 21:11     ` Michael Vilot [this message]
replies disabled

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