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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,999932ecc319322a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: advice on package design Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1110212638.336123.298580@l41g2000cwc.googlegroups.com> <1gbk0qx2sgzpg$.sltzfssofla8$.dlg@40tude.net> Date: Sat, 12 Mar 2005 21:45:35 +0100 Message-ID: <3jok3ghqqls8$.1rrsonb8jsurt$.dlg@40tude.net> NNTP-Posting-Date: 12 Mar 2005 21:45:25 MET NNTP-Posting-Host: 2007d6ba.newsread4.arcor-online.net X-Trace: DXC=l5L\:eKVo?NSZ`lLL_hK=J:ejgIfPPldDjW\KbG]kaMHGSi?jHD8GO@US@L@@2jVgN[6LHn;2LCVNCOgUkn_?_YORa:EN\TjCYO X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:9259 Date: 2005-03-12T21:45:25+01:00 List-Id: On 12 Mar 2005 14:57:17 -0500, Robert A Duff wrote: > If I were [re]designing Ada, I would make 'use' transitive. That is, > if Foo says "use Linked_List" that would make the contents of > Linked_List directly visible in Foo, and anything that says "use Foo;" > would have direct visibility on everything directly visible in Foo -- > not just the things *declared* in Foo. Or something like that. Yes, I really miss it. What about: use all ; or use package ; with the effect importing the specification of the package? Also, differently to use, it should prevent hiding. So: package A is Foo (X : Integer); end A; with A; package B is use all A; Foo (X : out Integer); -- Illegal, can't hide A.Foo end B; It could be also used for testing if a child package is parent-friendly: package Foo.Child is ... -- Lot of stuff private use all Foo; -- Fails if Child hides something in Foo ... end Foo; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de