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!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.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: <13duou81kg3sd1c@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> Date: Sun, 7 Oct 2007 09:49:21 +0200 Message-ID: <1bjt0zbm9czo6$.1kfq783m6iv4t$.dlg@40tude.net> NNTP-Posting-Date: 07 Oct 2007 09:49:25 CEST NNTP-Posting-Host: 606fd1df.newsspool1.arcor-online.net X-Trace: DXC=R2UM=LDAM8JFJ3]dH>I?oEic==]BZ:afN4Fo<]lROoRA4nDHegD_]RE:B6 On Sun, 07 Oct 2007 09:21:40 +0200, Pascal Obry wrote: > Now maybe some operations could be made safe, like those not using > cursors. For example, in Ada.Containers.Vectors: > > function Element > (Container : Vector; > Index : Index_Type) return Element_Type; > > Why this could not be made safe ? It can, but it is useless as long this safety is not expressed by the contract of Vector. So the choices are: 1. to make all operations safe 2. to declare a safe subtype of Vector with only safe operations available 3. to introduce the notion of "safe operation" and to declare Element "safe operation," using a pragma. Neither works. 1) is distributed overhead, 2) is impossible due to the language limitations, 3) is a mess [and possibly distributed overhead]. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de