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-02 10:29:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: "private with" proposal Date: 02 Dec 2002 13:20:34 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3dccc023$0$304$bed64819@news.gradwell.net> <3DD847CD.A3D78EE9@adaworks.com> <3DE5F0BB.E7D21384@brighton.ac.uk> <3DE66447.2D6@earthlink.net> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1038853917 28109 128.183.235.92 (2 Dec 2002 18:31:57 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 2 Dec 2002 18:31:57 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:31351 Date: 2002-12-02T18:31:57+00:00 List-Id: Vincent Marciante writes: > "with private" is a proposed addition to Ada; see > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00262.TXT?rev=1.13 > > I do not understand why the extra syntax (adding "private" to > the context clause) is necessary. Can't the rules be simply > be changed as outlined in the proposal? If compilers at this > time already do enough to recognize withing a private unit > in a public spec couldn't they be made to allow usage of withed > private units only in the private part (and body)? 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? The syntax alone is a trivial addition to the compiler; the semantics is more complex. The upside of the extra syntax is significant; the compiler can tell if some later maintenance code breaks a design decision; the reader can tell that package "foo" is implementation only, and not part of the visible spec. So i'd prefer to keep the "with private". In addition, there are some cases with generics where it really is necessary, to keep the generic contract. I posted a note about that here a while back (and to the ARG, as well). -- -- Stephe