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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fce663eaf40b52f6 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-meneldur.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Manifesto against Vector Date: Thu, 06 May 2004 11:29:03 +0200 Message-ID: References: NNTP-Posting-Host: tar-meneldur.cbb-automation.de (212.79.194.119) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1083834873 2533500 I 212.79.194.119 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: controlnews3.google.com comp.lang.ada:305 Date: 2004-05-06T11:29:03+02:00 List-Id: On Thu, 6 May 2004 09:03:54 +0200, "Jean-Pierre Rosen" wrote: >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". Why that should be told? I'd say that "with" is superfluous. >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. Maybe, but it should be placed at the beginning of the context. So it is just one line difference. Not a big issue, IMO. >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. This might work with bodies, but it does not with specifications. What would you do with: with Foo; procedure P (); >Allowing with/use would simply encourage a style that should be discouraged altogether. QED. Oh, Use is Use, and With is With, and never the twain shall meet, ... (:-)) -- Regards, Dmitry Kazakov www.dmitry-kazakov.de