comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Enforcing initialization protocol for protected type
Date: Mon, 14 Sep 2009 19:27:40 -0500
Date: 2009-09-14T19:27:40-05:00	[thread overview]
Message-ID: <h8mn4c$1ms$1@munin.nbi.dk> (raw)
In-Reply-To: b9fde919-8c26-4b75-acfc-6b2a37bca968@u16g2000pru.googlegroups.com

"Adam Beneschan" <adam@irvine.com> wrote in message 
news:b9fde919-8c26-4b75-acfc-6b2a37bca968@u16g2000pru.googlegroups.com...
...
>  Any language lawyers care to comment?

No. :-)

>  Is Per's example (with additional code as needed in the Initialize 
> procedure)
> guaranteed to work (as long as the Initialize protected procedure
> doesn't reference any components with per-object constraints that
> haven't yet been initialized), or is it ambiguous whether it will work
> or not?

I don't want to strain my brain that much. But you ought to be able to 
figure it out using all of the rules of 3.3.1. The reason the 3.3.1(18-19) 
were combined is that those operations can be interleaved. The rules for the 
ordering are given by 3.3.1(20-20.4). Note that by default all of the 
operations can be evaluated in an arbitrary order, but there are enough 
restrictions to that to ensure that most things that you would expect to 
write can work.

Note that "default initialization" is how the queues and the like of a 
protected object get initialized. (Ada 95 did not define a term for this 
process, but that caused duplication of wording all over the Standard, and 
*that* caused inconsistent rules.) I don't think there are any semantics 
attached to "creation".

                                     Randy.




                                        -- Adam





      reply	other threads:[~2009-09-15  0:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-07 15:15 Enforcing initialization protocol for protected type Maciej Sobczak
2009-09-07 17:01 ` Georg Bauhaus
2009-09-07 20:19   ` Maciej Sobczak
2009-09-10 17:07     ` Georg Bauhaus
2009-09-11  5:01     ` AdaMagica
2009-09-11  9:03       ` Dmitry A. Kazakov
2009-09-11 15:25         ` AdaMagica
2009-09-11 16:27           ` Dmitry A. Kazakov
2009-09-11 22:24             ` Randy Brukardt
2009-09-12  8:44               ` Dmitry A. Kazakov
2009-09-10 16:39 ` Per Sandberg
2009-09-14 21:15   ` Adam Beneschan
2009-09-15  0:27     ` Randy Brukardt [this message]
replies disabled

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