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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: 'Protected' abstract subprograms Date: Thu, 16 Jan 2014 20:49:28 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <839fee13-2743-49f6-a7f3-f95578386201@googlegroups.com> <1aav8alqsnqqv.5urmifgwh1mv.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1389923368 18893 192.74.137.71 (17 Jan 2014 01:49:28 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 17 Jan 2014 01:49:28 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:YYCgmxkbz4d+skMHqy9l2MSvpZ8= Xref: news.eternal-september.org comp.lang.ada:18203 Date: 2014-01-16T20:49:28-05:00 List-Id: AdaMagica writes: > On Thursday, January 16, 2014 1:51:31 AM UTC+1, Robert A Duff wrote: >> The only case I know of where the code in a package private part can affect the >> legality of code outside that package is this: >> >> package Recursive_Types is >> >> type T1 is private; >> >> package Nested is >> type T2 is private; >> private >> type T2 is record >> X: T1; > > I think this is illegal since it would freeze T1. Wouldn't it? No, declaring an object of type T1 would freeze T1, but a component does not. The freezing rules make my brain hurt. Even though I had a hand in writing them! ;-) A better-designed language would not have anything like freezing rules. >> end record; >> end Nested; >> >> private >> >> type T1 is record - Bob