comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: Protected types and visibility of their internals
Date: Wed, 9 Jul 2008 06:44:02 -0700 (PDT)
Date: 2008-07-09T06:44:02-07:00	[thread overview]
Message-ID: <2e1c5e60-6e93-4bfc-87da-ddba62e050c2@k37g2000hsf.googlegroups.com> (raw)
In-Reply-To: 5dfd2485-ae32-407d-a5e6-7caab2e79898@x41g2000hsb.googlegroups.com

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



  reply	other threads:[~2008-07-09 13:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08  9:57 Protected types and visibility of their internals Maciej Sobczak
2008-07-08 12:52 ` Georg Bauhaus
2008-07-08 16:13 ` Robert A Duff
2008-07-09  7:53   ` christoph.grein
2008-07-08 21:03 ` Randy Brukardt
2008-07-10 21:49   ` Maciej Sobczak
2008-07-09  5:04 ` christoph.grein
2008-07-09 13:44   ` Maciej Sobczak [this message]
2008-07-09 15:12   ` Adam Beneschan
2008-07-09 22:19 ` Stephen Leake
2008-07-09 22:38   ` Adam Beneschan
2008-07-10  0:18     ` Randy Brukardt
2008-07-10  0:18     ` Randy Brukardt
2008-07-09 23:22 ` jimmaureenrogers
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox