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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dbf84a1c2794f4fb X-Google-Attributes: gid103376,public From: "Norman H. Cohen" Subject: Re: packages and private parts Date: 1997/02/17 Message-ID: <33086E65.5EF0@watson.ibm.com>#1/1 X-Deja-AN: 219416050 References: <3304E195.275C@watson.ibm.com> Content-Type: text/plain; charset=us-ascii Organization: IBM Thomas J. Watson Research Center Mime-Version: 1.0 Reply-To: ncohen@watson.ibm.com Newsgroups: comp.lang.ada X-Mailer: Mozilla 3.0 (Win95; I) Date: 1997-02-17T00:00:00+00:00 List-Id: Tucker Taft wrote: > > The fact that only code in the subsystem "Ada.Numerics.Discrete_Random.*" > has visibility of the private declarations of Ada.Numerics.Discrete_Random > is essential to the child package concept. It means that when > you alter the private declarations, you can have confidence that only > code in this subsystem needs to be examined. To me, the whole point > of information hiding/encapsulation is to be able to find easily all of the > code that may need to be fixed when an implementation detail is changed. > > If you allow child packages of any instantiation to have such visibility, > then you have a potentially unbounded amount of code to find and fix, much > of which will not be available to the maintainers of the generic subsystem. Oh, I quite agree that, given visibility into the private parts of ancestor packages, the restriction against instances having ordinary children is necessary. I was just answering Bob Duff's question about why I consider the restriction annoying. (In programming, as in life, I recognize that many things that I find annoying are necessary.) -- Norman H. Cohen mailto:ncohen@watson.ibm.com http://www.research.ibm.com/people/n/ncohen