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: a07f3367d7,66f9ac28e8d63f60 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Enforcing initialization protocol for protected type Date: Mon, 14 Sep 2009 19:27:40 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <1fcccc80-0142-4f07-8852-8d151ea96ee2@c37g2000yqi.googlegroups.com> <4AA92BD9.7050902@bredband.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1252974540 1756 69.95.181.76 (15 Sep 2009 00:29:00 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 15 Sep 2009 00:29:00 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:8326 Date: 2009-09-14T19:27:40-05:00 List-Id: "Adam Beneschan" 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