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 X-Google-Attributes: gid103376,public From: dale@cs.rmit.edu.au (Dale Stanbrough) Subject: Re: Can't hide parts of ADTs in private children Date: 1998/11/10 Message-ID: #1/1 X-Deja-AN: 410091328 References: <364683EB.41C6@syd.csa.com.au> X-Complaints-To: abuse@cs.rmit.edu.au X-Trace: emu.cs.rmit.edu.au 910649816 29910 131.170.27.23 (9 Nov 1998 22:16:56 GMT) Organization: RMIT NNTP-Posting-Date: 9 Nov 1998 22:16:56 GMT Newsgroups: comp.lang.ada Date: 1998-11-09T22:16:56+00:00 List-Id: David Bowerman wrote: "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." Sorry, no solution, but an agreement that this is a problem. Private normally means that the abstraction lives in the package spec, and if changed clients have to recompile. The rules for private packages mean that you can't with a private package in a public spec, _even if it doesn't publically export anything from the private package_. E.g. package F is end F; private package F.Priv is type Handy is ...; end; with F.Priv; package F.Pub is type Public_Handy is private; private type Public_Handy is new F.Priv.Handy; end; This unfortunately is not allowed because private now has another meaning of... "you don't have to recompile external clients if a private package spec is changed" I would rather have the normal rule of "package spec change means recompilation of clients", than the existing rule which restricts the composability of types. Dale