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: 103376,470860aa3e635a7 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sun, 07 Oct 2007 18:41:08 +0200 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT for MS Visual Studio References: <13duou81kg3sd1c@corp.supernews.com> <13f3e0vbb05s47c@corp.supernews.com> <13f6eg0te46m2a3@corp.supernews.com> <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> <47088904.1090201@obry.net> In-Reply-To: <47088904.1090201@obry.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <47090c26$0$30380$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 07 Oct 2007 18:41:10 CEST NNTP-Posting-Host: eb52fad4.newsspool4.arcor-online.net X-Trace: DXC=he\kieI]N][@>[RYkFXOIP4IUK6n?FI?X X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:2338 Date: 2007-10-07T18:41:10+02:00 List-Id: Pascal Obry wrote: > Randy Brukardt a �crit : >> If you want dangerously unsafe containers, you are welcome to write them >> yourself. But they don't belong in the standard (surely not as the sole >> example of containers). > > I love those nonsense ! How can something that is only read be unsafe!!! I think because objects may involve access values, be passed by reference, etc. (The sentence corresponding to this thread in Barnes (2006) is brief and illuminating, bottom of page 642.) Then there is separate compilation which for a start cannot in general know about a Vector reference being used read-only in a program? I guess Randy did hint at implementation issues and possibilities. > And please between "dangerously unsafe containers" and "concurrent read > access containers" I think there is some room. Why always having such > strong and extreme position???? There was a question about concurrent reads from protected objects and why concurrent function calls on a protected object (in GNAT) still use a semaphore. Any news on this related issue? (IIRC, Stephen Leake wanted to ask AdaCore about this. ) The moment a Container could potentially be updated the read only model suffers. How could we express a countermeasure in Ada, e.g. a Freeze operation suitably defined, but not involving a protected object? At what cost? I imagine that a red-black tree used for implementing Ordered_Map might be in a surprising state when an Insert by a potential task B is interrupted by a reading task A. So we would have to have a way to express, at compile time, that there is no such B when A is about to start. Maybe this could justify relaxing the protection requirements.