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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6cb2525ffbfe23ce X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Why both "with" and "use"? Date: 1999/02/13 Message-ID: #1/1 X-Deja-AN: 444103587 Sender: matt@mheaney.ni.net References: <36C5B28C.F32C43A4@jps.net> NNTP-Posting-Date: Sat, 13 Feb 1999 15:11:11 PDT Newsgroups: comp.lang.ada Date: 1999-02-13T00:00:00+00:00 List-Id: Corey Minyard 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.