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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,470860aa3e635a7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: GNAT for MS Visual Studio Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4xsl4zw3bp.fsf@hod.lan.m-e-leypold.de> <1191357491.860178.230380@22g2000hsm.googlegroups.com> <4702ADCC.7080209@obry.net> <1191439439.120567.172630@g4g2000hsf.googlegroups.com> <4703F02D.3030207@obry.net> <1191682021.844225.236870@g4g2000hsf.googlegroups.com> <4707A3D0.3070702@obry.net> <1tq0h0fb74sxe$.2ys0qzmfxcqo.dlg@40tude.net> <4707C0CC.1000108@obry.net> <1aa677sd3f3ox.k8awuo7pj13r.dlg@40tude.net> <1191702767.598768.210960@o80g2000hse.googlegroups.com> <1aqbpv0czr253.wrmcd70o5se5$.dlg@40tude.net> <1191792620.535744.132500@50g2000hsm.googlegroups.com> Date: Mon, 8 Oct 2007 09:50:32 +0200 Message-ID: NNTP-Posting-Date: 08 Oct 2007 09:44:34 CEST NNTP-Posting-Host: 5a387e94.newsspool2.arcor-online.net X-Trace: DXC=ma09P80kACPYI9]OHn9o5^A9EHlD;3YcR4Fo<]lROoRQ<`=YMgDjhgR7_nIeakMCm[[6LHn;2LCV^7enW;^6ZC`TIXm65S@:3>_O169Ydf]PZR X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:2343 Date: 2007-10-08T09:44:34+02:00 List-Id: On Sun, 07 Oct 2007 14:30:20 -0700, Maciej Sobczak wrote: > On 7 Pa , 09:35, "Dmitry A. Kazakov" > wrote: > >> I don't see any difference for containers. When reads are synchronized (by >> whatever means) then everything is OK, so would be container reading. > > The difference is that you *don't* read a container. Instead, you > *call some function with some tagged object as a parameter*. This is > in some circles called "encapsulation", which can be translated as > "you have no idea what is really going on". ;-) It is called "higher level language," which translates to "you cannot have ideas even if you just do 'a read'". I.e. there is no difference. >> [ For protected objects, it seems that functions do not signal > > I would expect that protected procedures and entries signal functions, > but after careful reading of 9/2-9.b I'm puzzled. > > What is a shared data outside the protected object? > If I have an access variable that is kept inside the protected object > - is the object (the target) considered to be inside the protected > object as well? Certainly not. > If not, and the target is not protected, then *lot's* of patterns > don't work and the whole world breaks into pieces, so I assume that > the target object is considered to be protected, not just the access > variable. Maybe those patterns are just wrong? (:-)) If you use an access discriminant or component in a protected object, then the target shall not be accessible otherwise than through a protected action traversing this object. I don't see any problems with procedures and entries, functions are my concern. > But since the object cannot know whether it is referenced and from > where, then I assume that I actually don't have to keep anything in > the protected object and I can use its subprograms to synchronize > access to some object that lives outside of it. > In which case 9/2-9.b is complete non-sense. I am not sure what you mean here. You can safely access things outside protected objects from protected actions. You can also use stateful protected objects to enforce serialization (for example, by creating a semaphore). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de