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: Samuel Mize Subject: Re: Why both "with" and "use"? Date: 1999/02/16 Message-ID: <7acj53$1vu@news3.newsguy.com>#1/1 X-Deja-AN: 445065866 References: <36C5B28C.F32C43A4@jps.net> Organization: ImagiNet Communications, Ltd. User-Agent: tin/pre-1.4-981002 ("Phobia") (UNIX) (AIX/3-2) Newsgroups: comp.lang.ada Date: 1999-02-16T00:00:00+00:00 List-Id: Matthew Heaney wrote: > 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. [example snipped] > 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. I concur that the use clause is under-used and over-maligned. I do find it useful sometimes to be able to "with" a package without "using" it, to control namespaces and prevent annoying collisions. Overall, I'd just prefer that a "use" statement in a context clause implied the corresponding "with" statement. Best, Sam Mize