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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.213.106 with SMTP id nr10mr14445521pbc.2.1335735547566; Sun, 29 Apr 2012 14:39:07 -0700 (PDT) Path: r9ni113414pbh.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: okellogg@users.sourceforge.net Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Sun, 29 Apr 2012 14:37:40 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6794031.771.1335735460245.JavaMail.geo-discussion-forums@vbxz8> References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <4f97bf40$0$6559$9b4e6d93@newsspool4.arcor-online.net> <7039631.627.1335610937700.JavaMail.geo-discussion-forums@vbxz8> <10544679.2854.1335718755733.JavaMail.geo-discussion-forums@vbdx11> NNTP-Posting-Host: 93.208.121.173 Mime-Version: 1.0 X-Trace: posting.google.com 1335735547 29975 127.0.0.1 (29 Apr 2012 21:39:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 29 Apr 2012 21:39:07 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.208.121.173; posting-account=a23u_AkAAAB-Xz81hSqodYsmJRrMwioK User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-04-29T14:37:40-07:00 List-Id: On Sunday, April 29, 2012 9:04:34 PM UTC+2, Robert A Duff wrote: > > package P is > package Q is > private > end Q; > private > end P; > > package body P is > package body Q is > end Q; > end P; > > In the above nested case: > P spec can see things in Q spec (imagine all sorts of declarations > at various places above). Right. This appears natural to me because of the physical nesting: The full source text of Q spec is known to P spec once we're past the "end Q;". > Private part of Q cannot see things in private part of P. Again due to the physical nesting: At the point of Q's declaration the source text of P private part has not yet been seen. Thinking ahead, P.Q.R would differ in this respect as child R could see the private parts of its parent packages - IIUC a consequence of R's physical separation of the source text. > Nobody can say "with P.Q;". > If you say "with P;" you can automatically see Q. > Q cannot have its own with clauses. I'll admit, the fact that "with P.Q;" is illegal but "with P.Q.R;" would be legal seems a bit non-intuitive at first. > The one you mentioned: you can't have a child "package P.Q.R is". > Q spec is elaborated in the middle of elaborating P spec, > and similarly for the bodies. This does not change when Q is extended by child R: P and P.Q are elaborated before child R. > If we transform that structure into child packages: > [...] > > Now every statement I made above about the nested case > is no longer true. I don't like that. I think the semantics > of the two above structures should be identical. [...] If I play parser I can see why they are semantically different - but not in any way that would present an obstacle to my proposal, unless I'm overlooking something. Thanks, Oliver