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-15 16:25:37 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshub.sdsu.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: Sat, 15 Nov 2003 18:25:35 -0600 Date: Sat, 15 Nov 2003 19:25:34 -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: <3FB1609E.D56E315C@fakeaddress.nil> <3FB65716.85E1F775@fakeaddress.nil> In-Reply-To: <3FB65716.85E1F775@fakeaddress.nil> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <1IKdnYIxfIidWSui4p2dnA@comcast.com> NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-aCmCrSWtiQRnt97i9XIcHdO1xrCr0Xj82Zsi8ntR0Dun+psamUk7Z0CwmQYEIN2C4lxRKqUbafmM5qi!0KbdCnmVMZeyLfhxd928HA/sH2kaMYgHJP6QO8S2etiihVyC1SUkX+nPbCEexg== 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:2524 Date: 2003-11-15T19:25:34-05:00 List-Id: Gautier wrote: > This is not a problem, because they are *already* very different. > > To take Robert examples, > > use ASCII; > procedure Junk is > begin null; end Junk; > > (won't compile) is not at all the same as > > procedure Junk is > use ASCII; > begin null; end Junk; > > (meaningful). > > The example Outer / Inner is interesting. > > package Outer is > package Inner is end; > procedure Dummy; > end Outer; > > use Outer.Inner; > package body Outer is > procedure Dummy is > begin > null; > end Dummy; > end Outer; > > is accepted by GNAT 3.15p but rejected by ObjectAda 7.2.2 ! > At least it could speak for the "with and use" syntax of the > proposal. Wow! That was fast, my code sample was only up for a short time and at least two bug reports resulted. I used to say that I had two modes of writing Ada, in one I expected to write tens of thousands of lines between compiler bug reports. In the language lawyer mode, if I didn't generate one bug report per every twenty lines or so, I was slacking. Saying use Ascii; in a context clause is almost cheating in the second mode. It is such a special case, probably never occurs in "real" code, and takes a lot of work by compiler developers to get right. (If you do send in a bug report, please! don't mention my name. As far as I am concerned this is a pathological case.) The "use Outer.Inner" case is a bit more troubling. If the compiler also breaks on "with Outer; use Outer.Inner; package Foo is..." then I think it is worth a bug report. -- Robert I. Eachus 100% Ada, no bugs--the only way to create software.