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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d927b7ea9b65580a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-03 19:53:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-peer.gip.net!news.gsl.net!gip.net!snoopy.risq.qc.ca!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3DED7C37.19D@earthlink.net> From: Vincent Marciante X-Mailer: Mozilla 3.0 (OS/2; I) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: "private with" proposal References: <3dccc023$0$304$bed64819@news.gradwell.net> <3DD847CD.A3D78EE9@adaworks.com> <3DE5F0BB.E7D21384@brighton.ac.uk> <3DE66447.2D6@earthlink.net> <3DEC42E0.407B@earthlink.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 04 Dec 2002 03:52:33 GMT NNTP-Posting-Host: 65.178.1.246 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1038973953 65.178.1.246 (Tue, 03 Dec 2002 19:52:33 PST) NNTP-Posting-Date: Tue, 03 Dec 2002 19:52:33 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:31400 Date: 2002-12-04T03:52:33+00:00 List-Id: Randy Brukardt wrote: > > Vincent Marciante wrote in message <3DEC42E0.407B@earthlink.net>... > >Stephen Leake wrote: > > > >> You are correct, the "extra syntax" of "private" in the context > clause > >> is not strictly necessary; the compiler and reader could figure out > >> what's going on. > >> > >> But what is the downside of having the extra syntax? > > > >Discussing in the same AI as the one pertaining to > >visability _within_ hierarchies confuses to issue. > > The entire point is that visibility is the wrong model for this. The > syntax is tied to a legality rule (not a visibility rule), in order that > added or removing 'private' or moving a declaration from the private > part to the visible part does not silently change the meaning of a > program. (This is covered in the AI). Okay, my phraseology reflected my inadaqate apreciation for the distinction between visability rules and legality rules. If the rule would be a legality rule, does that imply that new syntax is strictly necessary? > A secondary issue is the desire to think of the private part as a > separate part. We discussed allowing separate compilation of private > parts; in that case, 'private with' is just the context clause of the > private part. > > The visibility rules are already way too complex in Ada, and your > suggestion would make them even more complex. Moreover, changing a unit > from private to non-private (or vice-versa) could silently change the > meaning of a program from one legal meaning to a different legal > meaning. (Currently, any such program is illegal, as the with would be > illegal when the unit is private; with 'private with' as currently > described, the use that causes the problem would be illegal.) Okay, suggesting specifically a visibility rule was unintended. > In any case, 'private with' is easy to describe, easy to understand, > easy to use, and easy to implement. A better solution (such as separate > compilation of private parts) may exist, but waiting for the perfect > solution to an important problem when we have an adequate solution that > we can use now would be a mistake. > Randy Brukardt Thanks for the condensed explanation. -- Vinny