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,4103f02f9e6c4df2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-12 16:17:57 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!news.iac.net!news-out.cwix.com!newsfeed.cwix.com!howland.erols.net!usc.edu!ragnarok.cts.com!thoth.cts.com!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: Ada 0y wish list: "with private" Date: 12 Feb 2001 16:10:44 -0800 Organization: CTSnet Internet Services Sender: kst@king.cts.com Message-ID: References: <968p1e$8m7$1@s1.read.news.oleane.net> NNTP-Posting-Host: king.cts.com X-Trace: thoth.cts.com 982023049 61634 209.68.192.180 (13 Feb 2001 00:10:49 GMT) X-Complaints-To: abuse@cts.com NNTP-Posting-Date: Tue, 13 Feb 2001 00:10:49 +0000 (UTC) X-Newsreader: Gnus v5.5/Emacs 20.3 Xref: supernews.google.com comp.lang.ada:5203 Date: 2001-02-12T16:10:44-08:00 List-Id: "Thierry Lelegard" writes: > Recently, several wishlist items for Ada 0y were posted in c.l.a. > Like many old Ada users, I have a couple of them. I would like to > propose one for discussion: a "with private" extension. > > The idea is to specify in a context clause of a unit spec that an > external unit can be used only in the private part. > > Example: > > with A; > with private B; > package C is > X : A.TA; > private > Y : B.TB; -- legal only in private part > end C; What about this syntax: with A; package C is X : A.TA; private with B; Y : B.TB; end C; The advantage is that it puts the context clause within the private part, which is what it applies to. One possible drawback: Currently, the compiler sees all the context clauses before the beginning of the package; with this syntax, it will have to process the public declarations of C before seeing the "with B;". Some implementations would have more difficulty with this than others; would it be an unreasonable burden for any of them? (It also looks a bit odd to put a context clause into a sequence of declarations.) -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> MAKE MONEY FAST!! DON'T FEED IT!!