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: a07f3367d7,efde8669839c1c0a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!postnews.google.com!h13g2000yqk.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Proper program structure Date: Thu, 1 Oct 2009 13:01:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: <35f850af-2aed-4fe8-be6d-473ab698c181@h13g2000yqk.googlegroups.com> References: <638d582c-f275-48a9-aa2a-237f2edd123c@c37g2000yqi.googlegroups.com> NNTP-Posting-Host: 83.77.163.119 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1254427317 17315 127.0.0.1 (1 Oct 2009 20:01:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 1 Oct 2009 20:01:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h13g2000yqk.googlegroups.com; posting-host=83.77.163.119; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8565 Date: 2009-10-01T13:01:57-07:00 List-Id: On 1 Pa=C5=BA, 17:36, Brad Moore wrote: > OK, but I can apply a similar technique to hide the routines from the > public interface of the car. In this case, I renamed the Cars.Vehicle > package to be Cars.Vehicle_Internal, then created a public Cars.Vehicle > package that wraps the internal one, but hides the interfaces that you > do not want to expose. > > Is this version acceptable? Well, it is acceptable in the same way as the other options that I have described. In other words, due to the fact that the right way does not work, I have to use some inferior solution that always has a price in the design that does not accurately reflect the original intent. Thank you very much for you complete examples, but I have finally settled on two-phase initialization of components (so each has an Init procedure that is used to wire them together and all Inits are called from the constructor of the whole). This solution allows to keep the reasonable package hierarchy (no artificial packages are needed) and avoids a number of forwarding subprograms. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada