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-Thread: 103376,f93e461e8491e322 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Fri, 19 Jan 2007 01:47:59 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: Limited_Controlled, orthogonality and related issues Date: Fri, 19 Jan 2007 01:48:52 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-l3mP8myibDhFh5E6eWe2zbNIhY0vZXniB9Mo9/EjTENTfQ6V9+q4iJB9SZotvZUAmYS3lpE/7z+aqSv!n89L2bl5RfdsRtqDqRvF3l67S5pXUkV+p6Qqp5VS/nLicqX/4Yi8LFPaTbh7JJip2Ylnh24yBrfF!Wxgly14zsmIiyQ== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:8311 Date: 2007-01-19T01:48:52-06:00 List-Id: "Maciej Sobczak" wrote in message news:eoned5$663$1@cernne03.cern.ch... ... > In conclusion, my decision to make T and S controlled appeared to not be > orthogonal to the rest of the package. > > What are your thoughts about this? It's dubious to have two abstractions in the same package. It's a nice simplification compared to other languages, but it's usually better to have fewer types in one package rather than more. If T and S were in different packages, this problem wouldn't happen. Note that one of the packages could be nested or a child, and that would still have the visibility on the private part. Something like: package Root is type S is limited private; ... end Root; package Root.Child is type T is limited private; procedure Do_Something (A : T, B : S); ... end Root.Child; Usually, one or the other of the abstractions can be used alone, and that is the one that belongs in the root. Randy.