comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Why both "with" and "use"?
Date: 1999/02/13
Date: 1999-02-13T00:00:00+00:00	[thread overview]
Message-ID: <m3lni1ucb9.fsf@mheaney.ni.net> (raw)
In-Reply-To: m2socaxfjw.fsf@wf-rch.cirr.com

Corey Minyard <minyard@acm.org> writes:

> But in most cases, being able to know the package the item is declared
> in is quite useful.

Yes, this is true, but not using a use clause isn't the only way to
effect this goal.  Careful naming conventions make the origin of the
entity obvious, in spite of the presence of a use clause.

For example:

package Digitizer_Id_Types is

   type Digitizer_Id is range 1 .. 2;

end Digitizer_Id_Types;


with Digitizer_Id_Types;  use Digitizer_Id_Types;
...

   Digitizer : Digitizer_Id;


It's pretty obvious that type Digitizer_Id comes from package
Digitizer_Id_Types.  No amount of package renaming or subtype
declarations are going to make it any more obvious.

These days, I hardly ever don't use a use clause, and I've formed the
tentative opinion that Ada should have defined the with clause to have
the semantics of both with and use.





  reply	other threads:[~1999-02-13  0:00 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-13  0:00 Why both "with" and "use"? Mike Silva
1999-02-13  0:00 ` Corey Minyard
1999-02-13  0:00   ` Matthew Heaney [this message]
1999-02-13  0:00     ` Tom Moran
1999-02-14  0:00       ` Matthew Heaney
1999-02-13  0:00     ` bill
1999-02-14  0:00       ` dewar
1999-02-14  0:00       ` dewar
1999-02-14  0:00       ` Matthew Heaney
1999-02-16  0:00     ` Samuel Mize
1999-02-17  0:00       ` Jean-Pierre Rosen
1999-02-18  0:00         ` robert_dewar
1999-02-18  0:00           ` Jean-Pierre Rosen
1999-02-18  0:00             ` robert_dewar
1999-02-19  0:00               ` Jean-Pierre Rosen
1999-02-18  0:00         ` dennison
1999-02-18  0:00           ` robert_dewar
1999-02-19  0:00             ` Robert I. Eachus
1999-02-19  0:00               ` robert_dewar
1999-02-23  0:00                 ` Robert I. Eachus
1999-02-19  0:00               ` Brian Hanson
1999-02-19  0:00                 ` robert_dewar
1999-02-19  0:00             ` dennison
1999-02-19  0:00             ` bourguet
1999-02-19  0:00               ` robert_dewar
1999-02-19  0:00           ` Matthew Heaney
1999-02-19  0:00             ` dennison
1999-02-19  0:00               ` robert_dewar
1999-02-19  0:00                 ` dennison
1999-02-19  0:00                   ` robert_dewar
1999-02-19  0:00                 ` Ada multiple string personalities. why so many? mike
1999-02-19  0:00                   ` Tom Moran
1999-02-19  0:00                     ` Mike Silva
1999-02-22  0:00                       ` Brian Hanson
1999-02-19  0:00                   ` robert_dewar
1999-02-17  0:00       ` Why both "with" and "use"? Matthew Heaney
1999-02-17  0:00       ` dennison
1999-02-17  0:00         ` Samuel Mize
1999-02-17  0:00         ` Nick Roberts
1999-02-17  0:00       ` Jean-Pierre Rosen
1999-02-13  0:00   ` mike
1999-02-13  0:00 ` Pat Rogers
1999-02-13  0:00   ` bill
1999-02-13  0:00     ` Pat Rogers
1999-02-13  0:00       ` Matthew Heaney
1999-02-13  0:00         ` bill
1999-02-14  0:00         ` Pat Rogers
1999-02-14  0:00           ` Bob Collins
1999-02-14  0:00             ` Pat Rogers
1999-02-16  0:00         ` Samuel Mize
1999-02-13  0:00     ` Matthew Heaney
1999-02-15  0:00     ` Jean-Pierre Rosen
1999-02-15  0:00       ` Ed Falis
1999-02-16  0:00         ` Jean-Pierre Rosen
1999-02-15  0:00 ` Jean-Pierre Rosen
replies disabled

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