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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.234.39 with SMTP id ub7mr3132816pac.26.1400871309351; Fri, 23 May 2014 11:55:09 -0700 (PDT) X-Received: by 10.140.97.166 with SMTP id m35mr43406qge.28.1400871309229; Fri, 23 May 2014 11:55:09 -0700 (PDT) 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!news.glorb.com!c1no15344384igq.0!news-out.google.com!qf4ni12380igc.0!nntp.google.com!c1no15344361igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 23 May 2014 11:55:09 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=93.37.95.140; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 NNTP-Posting-Host: 93.37.95.140 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <29a09fe5-72c0-40e0-bf72-632c4a13232e@googlegroups.com> Subject: Re: What is the difference of "with null record" and "with private"? From: mockturtle Injection-Date: Fri, 23 May 2014 18:55:09 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:19989 Date: 2014-05-23T11:55:09-07:00 List-Id: On Friday, May 23, 2014 8:21:21 PM UTC+2, Victor Porton wrote: > Victor Porton wrote: >=20 >=20 >=20 > > What is the difference of "with null record" and "with private"? > >=20 > > Both denote a descendant of a type with no new additional public fields= . > > I see no difference. What is the difference and when one or another sho= uld > > be used? >=20 > Clarification of my question: I mean the case when the full view of the t= ype=20 > is "with null record". >=20 Well, as I see it, it is more a matter of visibility. It is true that in b= oth cases you have the same "structure" (namely, the ancestor with no new f= ields), but in the case of "with private" the "users" (that is, the package= s that use the derived type) do not know that... One could say that "with private" is used to hide the internal details of y= our type and that if the extension is done with a "null record" there is no= t much to hide. Actually, I cannot imagine a case where the fact that it is= public that the extension is null can cause loss of maintainability the da= y some new fields are added. Nevertheless, usually I prefer the "with priv= ate" form for uniformity. Riccardo