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.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: packages and private parts Date: 1997/02/16 Message-ID: #1/1 X-Deja-AN: 219199835 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <3304E195.275C@watson.ibm.com> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-02-16T00:00:00+00:00 List-Id: Norman H. Cohen (ncohen@watson.ibm.com) wrote: : ... Yes, I know, the rule prohibiting Random_Dice : from having noninstance children ensures that a package whose name is : not of the form Ada.Numerics.Discrete_Random.* does not have visibility : into the private part of instances of Ada.Numerics.Discrete_Random. But : that's a rather obscure consideration, of interest primarily to us : language lawyers, and probably the farthest thing from the mind of the : programmer who writes the code above and finds that it won't compile. 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. : Norman H. Cohen : mailto:ncohen@watson.ibm.com : http://www.research.ibm.com/people/n/ncohen -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Cambridge, MA USA