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-03 08:26:42 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.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: Mon, 03 Nov 2003 10:26:40 -0600 Date: Mon, 03 Nov 2003 11:26:39 -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> <3FA3B412.AF3BEB96@fakeaddress.nil> 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-diPDa58AAHEpaxwfZMiSI+JVff0d14welSeEHWm0I6NMF+lPnDS3k3YHH+mj4Fwne4UawwO1pyOvdV6!EAW4CtrEjOzRsqJs/vFbRWgY0jNmOEIswMOPalY+J8bgLJoE6RRy0mlzYDO25A== 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:1995 Date: 2003-11-03T11:26:39-05:00 List-Id: Russ wrote: > OK, I think I'm starting to get it. Redundant keystrokes are what make > Ada the great language it is! I guess I was just too stubborn to see > that sooner. Now that I see the light, let me propose a way to use > even more redundant keystrokes: No, what makes Ada the wonderful language that it is, is the effort put into scrutinizing every proposed change to see what effects it will have on all the "-ilities," especially in this case readability and maintainability, to decide whether a proposed improvement really will be an improvement overall. Having said that, let me make a suggestion that might be an improvement on this one. Add a "use all" clause. This would indictate that all withed packages and their parents should be used. Probably useful as such only in small demo programs. But "use all Ada.Strings;" would be a generally useful form, indicating that Ada.Strings, and all nested or child packages that are visible should be made "use" visible. Whether it should include generic instances would be worth discussing. I think that if it included all generic instances visible at the place of the "use all" clause would be an interesting extension to consider. I think not. Instead create a child of Text_IO, Ada.Text_IO.Intances that contained instances of the various Text_IO generics for all predefined types (probably excepting instances of Enumeration_IO). So with such a package: package Ada.Text_IO.Instances is package Integer_Text_IO is new Integer_IO(Integer); package Long_Integer_Text_IO is new Integer_IO(Long_Integer); package Short_Integer_Text_IO is new Integer_IO(Short_Integer); package Float_Text_IO is new Float_IO(Float); package Long_Float_Text_IO is new Float_IO(Long_Float); package Duration_Text_IO is new Fixed_IO(Duration); end Ada.Text_IO.Instances; You could then put a with Ada.Text_IO.Instances at the beginning of appropriate units, and a "use all Ada.Text_IO.Instances;" in nested scopes where the actual IO is done. -- Robert I. Eachus 100% Ada, no bugs--the only way to create software.