comp.lang.ada
 help / color / mirror / Atom feed
From: george.priv@gmail.com
Subject: Re: Obtaining access to protected object
Date: Wed, 9 Jul 2008 19:10:39 -0700 (PDT)
Date: 2008-07-09T19:10:39-07:00	[thread overview]
Message-ID: <c78104d1-55f2-42d4-8f50-302ff18da3ed@d1g2000hsg.googlegroups.com> (raw)
In-Reply-To: f1f749f7-05c2-4bb6-8838-1aa0187faded@27g2000hsf.googlegroups.com

On Jul 9, 3:27 pm, Adam Beneschan <a...@irvine.com> wrote:
> On Jul 9, 8:33 am, george.p...@gmail.com wrote:
>
> > The instance may not be aliased, and type itself is not enough to
> > determine that at compile time.
>
> Wrong.  The current instance of a protected type is always considered
> aliased, and 'Access is allowed.  3.10(9/2).
>
>                              -- Adam

I may be wrong, but it seems that Aliaseness is guaranteed only within
the protected body. So taking pointer and spilling it outside of the
scope (even if allowed) is bad idea IMHO.  If used inside the
protected body then what's advantage of using pointer vs. referring
directly?

George



  reply	other threads:[~2008-07-10  2:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 20:41 Obtaining access to protected object Maciej Sobczak
2008-07-09 15:03 ` Adam Beneschan
2008-07-09 21:21   ` Maciej Sobczak
2008-07-09 21:57     ` Adam Beneschan
2008-07-09 22:01     ` Georg Bauhaus
2008-07-10  0:39     ` Randy Brukardt
2008-07-09 15:33 ` george.priv
2008-07-09 19:27   ` Adam Beneschan
2008-07-10  2:10     ` george.priv [this message]
2008-07-10 14:46       ` Adam Beneschan
replies disabled

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