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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d4e2f238dc61c890 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!k37g2000hsf.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Protected types and visibility of their internals Date: Wed, 9 Jul 2008 06:44:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2e1c5e60-6e93-4bfc-87da-ddba62e050c2@k37g2000hsf.googlegroups.com> References: <5dfd2485-ae32-407d-a5e6-7caab2e79898@x41g2000hsb.googlegroups.com> NNTP-Posting-Host: 128.141.45.223 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1215611043 13515 127.0.0.1 (9 Jul 2008 13:44:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 9 Jul 2008 13:44:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k37g2000hsf.googlegroups.com; posting-host=128.141.45.223; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1046 Date: 2008-07-09T06:44:02-07:00 List-Id: On 9 Lip, 07:04, christoph.gr...@eurocopter.com wrote: > You can however hide the PO in the body and export the operations via > renaming. I want the protected type to be a type so that users of the package can make instances of it. In other words, it is not a singleton (this would justify moving the state to the package body). The "real" solution is synchronized interface + derived hidden implementation + factory function, but this solution happens to be also very heavy-handed and... fragile with regard to the ability of today compilers to properly digest it. Sigh. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com