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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,60e2922351e0e780 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-06 23:08:13 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" Date: 6 Nov 2003 23:08:13 -0800 Organization: http://groups.google.com Message-ID: References: <3FA2CDCB.500F4AF0@fakeaddress.nil> <3FA6D275.924D5750@fakeaddress.nil> <1067951806.729117@master.nyc.kbcfp.com> <1068123815.335508@master.nyc.kbcfp.com> <3FAAB12E.C7593B45@fakeaddress.nil> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1068188893 21125 127.0.0.1 (7 Nov 2003 07:08:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 7 Nov 2003 07:08:13 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:2188 Date: 2003-11-06T23:08:13-08:00 List-Id: Gautier Write-only wrote in message news:<3FAAB12E.C7593B45@fakeaddress.nil>... > > Hyman Rosen: > > [...] > > > for an example of the latter form. It contains > > > with ADA.TEXT_IO, ADA.CALENDAR, ADA.CHARACTERS.LATIN_1; > > > use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1; > > > > > > So upon seeing a with/use pair, I have to read it carefully to > > > see if the two lists are the same, and if they are not, try to > > > figure out why that may be. > > Warren W. Gay VE3WWG: > > The other problem is that you don't always want to "use" > > every with. Consider [...] > > It is exactly what the author of the above code wanted, > not to "use" ADA.CALENDAR. *This* would be a lot clearer if only > > with ADA.CALENDAR; > use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1; > > was sufficient (this is the "implicit 'with'" variant) - or > > with ADA.CALENDAR; > with and use ADA.TEXT_IO, ADA.CHARACTERS.LATIN_1; > > And the list can be long in *certain* programs, *not* the > safety-critical code or whatever "special" code where > anyway an Ada subset without "use" at all is preferable, > *but* the "everyday programming" where some general-purpose > packages for > - the Text_IO stuff > - the Floating-point maths > - GUI stuff > are obviously better to be "use"-d at the unit level. > And this is still a *minority* of packages, the other ones, > specialized, would be of course only "with"ed by normal persons. > > All that is a question of style, project, taste, security, > about the usage of "use", which is already in the language. > The purpose of the proposal is not to reintroduce "use" or > changing any style rule, but *only* to make the life > easier and programs clearer when (and only when) we use > "use" as a context clause. > The question of desirability of "use" in such or such context > or for such or such package is *another* problem - and sorry, > "use" exists, it won't be removed, but if one wants one can > avoid it, at worst with a language subset, and it won't hurt > anybody. > > The whole debate has (as expected ;-) shifted from > "how to make use-as-a-context-clause easier" > to > "to use or not to use" > or even > "to += or not to +=". > Please (dear participants) remain on-topic... I'm with you on this one. Whether it's "with and use," with/use", or simply "use" (as context clause) implies "with" (my preference), I just don't see any rational argument against it. Programmers would still be able to use "with" and "use" exactly as they do now. You've heard of a "tin ear", but I think it takes a "tin eye" to insist on repetitive "with" and "use" for things like basic I/O. Try to imagine how many potential Ada users are turned off by such clutter. By the way, I am not the one who introduced "+=" on this thread. I merely replied to someone else's offhand remark.