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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: some trivial questions? Date: Mon, 06 Nov 2017 21:53:19 +0100 Organization: Home - http://www.obry.net Message-ID: <1510001599.30535.24.camel@obry.net> References: <6a5368c5-f015-4dcb-9291-e77b40fa1bf1@googlegroups.com> Reply-To: pascal@obry.net NNTP-Posting-Host: DVgHcrH6MS5K+jsRCpud6Q.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Complaints-To: abuse@aioe.org X-Mailer: Evolution 3.26.2-1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:48741 Date: 2017-11-06T21:53:19+01:00 List-Id: Le mercredi 01 novembre 2017 =C3=A0 11:44 -0700, tclwarrior@gmail.com a =C3= =A9crit : > Also why does is Use imply With?=20 > For example why do i have to say: >=20 > with Ada.Text_IO; > use Ada.Text_IO; Because with is for dependencies. Imagine you'll have to look in all the unit to check for the "use" if you want to know what are the dependencies! Also, it is better to put the use locally where it is really needed and even if possible avoid uses. When the package is defined to avoid "use", then it is no harder to not use "use" clauses. As an example Unbounded_String has been designed to be "use". The package is named: Ada.Strings.Unbounded_String. So Unbounded_String is a self contained name, Ada.Strings is just noise here. Now if the name was named just Unbounded, then you may just "use Ada" and write: Strings.Unbounded No longer, no harder, no more verbose than: Unbounded_String And add some "use [all] type" where it applies to have the operator visible. --=20 Pascal Obry / Magny Les Hameaux (78) The best way to travel is by means of imagination http://www.obry.net gpg --keyserver keys.gnupg.net --recv-key F949BD3B