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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f443e975621b7347,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Hiding details and protected types Date: Tue, 24 Apr 2007 15:44:40 +0200 Organization: CERN News Message-ID: NNTP-Posting-Host: pb-d-128-141-44-95.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1177422283 5320 128.141.44.95 (24 Apr 2007 13:44:43 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Tue, 24 Apr 2007 13:44:43 +0000 (UTC) User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) Xref: g2news1.google.com comp.lang.ada:15255 Date: 2007-04-24T15:44:40+02:00 List-Id: Hi, Let's say there is a protected type: protected type PT is procedure P; private A : T; end PT; where T is some type that is really an implementation detail of PT. It is not possible to declare this type in the private part of the protected type (why?), so it has to be declared outside PT: type T is ...; protected type PT is procedure P; private A : T; end PT; The problem is that declaring T in the same declaration scope pollutes the name space and is against Good Engineering Principles (tm). How can I hide it? Some juggling with packages comes to mind - any recommendations? -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/