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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,fce663eaf40b52f6 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nnx.oleane.net!oleane!nnrp.oleane.net!skymaster!nobody From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Manifesto against Vector Date: Thu, 6 May 2004 09:03:54 +0200 Organization: Adalog Message-ID: References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 1083827835 26831 195.25.228.57 (6 May 2004 07:17:15 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 6 May 2004 07:17:15 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Xref: controlnews3.google.com comp.lang.ada:302 Date: 2004-05-06T09:03:54+02:00 List-Id: "Russ" <18k11tm001@sneakemail.com> a �crit dans le message de [...] > That may be so, but this particular issue is simple enough even for an > ameteur like me. I know that > > with/use Ada.Integer_Text_IO; > > is cleaner and simpler than > > with Ada.Integer_Text_IO; use Ada.Inteqer_Text_IO > > And I also that it is a trivial matter to parse the former to produce > the latter. I could do it myself in a few minutes. Nor does it break > compatibility with legacy code in any way. I see absolutely no > reasonable objection to "with/use" (but I have a funny feeling that I > may soon be bombarded with a lot of unreasonable objections). > Since you asked for it... (but I'll try to have reasonable objections). Note that I am known for being strongly *in favor* of the use clause. I would strongly oppose this proposal for a very simple reason: it defeats the main goal of having separated with from use. With is a library level clause; it tells: "this unit, somewhere needs that unit". Use opens the visibility: it tells: "here is the scope where I actually use the unit". A use clause should always be for the innermost context where the unit is actually used. Therefore, you should *never* have a use clause as a context clause. If I need to have something visible everywhere in a unit, I use the same style as when the visibility is more restricted, i.e. I don't write: with Foo; use Foo; procedure P is ... end P; but rather: with Foo; procedure P is use Foo; ... end P. Allowing with/use would simply encourage a style that should be discouraged altogether. QED. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr