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-14 07:18:42 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!rip!news.webusenet.com!peer01.cox.net!cox.net!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 14 Nov 2003 09:18:39 -0600 Date: Fri, 14 Nov 2003 10:18:37 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" References: <3FA2CDCB.500F4AF0@fakeaddress.nil> <1068561335.260886@master.nyc.kbcfp.com> <_rGsb.39$pv1.0@read3.inet.fi> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-VrPf5bF5s420dS0ecdXLsD2yaDzzv4zbpVGXRjtRuQecx6XV6DpibDYij4uSjiDdGL600H6nq3vG/Sl!u+FIfzxclOkJjJ62vsHhf4t+4MEhfdiwX1ne6KqfSKub3RH6jbncaHk/tFENrA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:2496 Date: 2003-11-14T10:18:37-05:00 List-Id: Georg Bauhaus wrote: > I'm wondering whether a "use" deep down might indicate that this > piece of code doesn't really belong in this unit? > (I like this feature, but do I like something here that I shouldn't?) It can, but it doesn't always. A good example is a group of ADTs that have display operations. The display operations belong in the package with the other operations on the same type, but they may be the only operation that needs to use Text_IO or some graphics packages. You can organize things using child packages to segregate the I/O operations, but you end up with the display operation being the only one to use the child package. Instead I usually end up with a generic package that handles the display operations in a data independent manner, and the individual display operations instantiate that package. Now the use clause is for a local generic instance, but it is still there. -- Robert I. Eachus 100% Ada, no bugs--the only way to create software.