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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public From: Rosen.Adalog@wanadoo.fr (J-P. Rosen) Subject: Re: Use use type? (Was Re: Safety-critical development in Ada and Eiffel) Date: 1997/08/01 Message-ID: <5rrr5a$dds$2@peuplier.wanadoo.fr>#1/1 X-Deja-AN: 261134606 References: <5r64cq$meh@peg.apc.org> Organization: Adalog Reply-To: Rosen.Adalog@wanadoo.fr Newsgroups: comp.lang.ada Date: 1997-08-01T00:00:00+00:00 List-Id: jsa@alexandria.organon.com (Jon S Anthony) wrote: >In article <5r64cq$meh@peg.apc.org> morganpalaeo@peg.apc.org (Morgan Palaeo Associates) writes: >> bobduff@world.std.com (Robert A Duff) wrote: >> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >> > >> >The choice of names. "With" should be "use" or "uses" (the latter is >> >from UCSD Pascal, I think). "Use" should be I-don't-know-what, but >> >something other than "use". Then, when I say, "Package X uses package >> >Y", you wouldn't be confused as to whether I mean "Package X makes use >> >of package Y (i.e. X is a client of Y)", versus "There's a use_clause on >> >package X saying 'use Y'". And we avoid the verbing of "with", as in >> >"Package X withs package Y." (or is it "with's"?) which sounds horrible >> >in English. "To with" ain't a verb, in English. ;-) >> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >> >> use X; view X; >uses X; localize X; -- ?? (as in "local phone call") I do not agree. When I go walking, I take some food WITH me. I open the box when I want to USE it. The whole idea of the use clause is that often, you don't need a withed package everywhere. If I write -say- a complex number package with a Put function, I have to with Text_IO; however I use it only in the Put function. The use clause is intended to do just that: open visibility only in places where the package is really used. This means that in general, it is a bad idea to put the use clause on top of the pakage, except if you really use the package everywhere. Unfortunately, this was the case for every example in RM83, and people tended to do it systematically, and then complained that things got visible even when not used... For more details, refer to "In defense of the USE clause" in Ada letters, Nov. 87. This note is NOT intended to restart the old debate about the use clause ;-) ---------------------------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) NEW ! Visit Adalog's web site at http://perso.wanadoo.fr/adalog