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,cd029b9d6c03962d,start X-Google-Attributes: gid103376,public From: David Bowerman Subject: Can't hide parts of ADTs in private children Date: 1998/11/09 Message-ID: <364683EB.41C6@syd.csa.com.au>#1/1 X-Deja-AN: 409849137 Content-Transfer-Encoding: 7bit Sender: news@syd.csa.com.au X-Nntp-Posting-Host: jetranger Content-Type: text/plain; charset=us-ascii Organization: CSC Australia Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-11-09T00:00:00+00:00 List-Id: I am implementing an Abstract Data Type (Class) in a package. The code goes something like this: package Class_X_Package is type Class_X is private; type Class_X_Ptr is access Class_X; ... operations on objects of type X private type Class_X is record Component_A : Type_A; Component_B : Type_B; ... end record; end Class_X_Package; The abstract data type (X) is complex, and Type_A, Type_B, etc hide a lot of structure within themselves. I would like to break the package down further, declare the types, and generally hide the details of, Type_A, Type_B, etc (never intended to be visible to the client) in private child packages. But I can't do this because these types are referred to in the private part of the parent package spec, and this isn't allowed to 'with' its children. Can anyone suggest another way of doing it.