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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,29d8139471e3f53e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!y3g2000vbm.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: Preventing type extensions Date: Fri, 17 Sep 2010 14:05:26 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <87iq2bfenl.fsf@mid.deneb.enyo.de> <874odv9npv.fsf@ludovic-brenta.org> <87y6b7cedd.fsf@mid.deneb.enyo.de> <66a3704c-54f9-4f04-8860-aa12f516134b@t3g2000vbb.googlegroups.com> <87d3sib44t.fsf@mid.deneb.enyo.de> <134q4k2ly2pf4$.17nlv1q6q5ivo.dlg@40tude.net> <1c27b555-0832-413a-b585-e5c6b22e8ac4@t7g2000vbj.googlegroups.com> <61f53fe2-1592-4e35-8af5-6e0ff79c0ffe@m16g2000vbs.googlegroups.com> NNTP-Posting-Host: 174.28.230.86 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1284757526 19987 127.0.0.1 (17 Sep 2010 21:05:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 17 Sep 2010 21:05:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y3g2000vbm.googlegroups.com; posting-host=174.28.230.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET CLR 4.0.20506),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14149 Date: 2010-09-17T14:05:26-07:00 List-Id: On Sep 17, 1:04=A0am, AdaMagica wrote: > On 17 Sep., 02:16, Shark8 wrote: > > > Sure, a child-package could be introduced to extend the object, but > > its specification cannot rely on anything not publicly visible in its > > parent's specification... meaning that the public portion of the > > object cannot expose that it is a tagged record. Right? > > package X is > > =A0 type Final is private; > > private > > =A0 type Final is tagged null record; > > end X; > package X.X is > > =A0 type Extended_Final is tagged private; > > private > > =A0 type Extended_Final is new Standard.X.Final with null record; > > end X.X; Yes, but that is NOT exposing that FINAL is tagged, only that Extended_Final is; moreover, since the definition of Extended_Final [which extends FINAL] is in the private portion it cannot be relied upon in the public portion of other specifications... (i.e. we are free to change Extended_Final's implementation in any way we see fit so long as it satisfies all its public specifications.)