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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f2690a5e963b61b6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "Dmitriy Anisimkov" Newsgroups: comp.lang.ada Subject: Re: GCC 4.0 Ada.Containers Cursor danger. Date: 17 Jul 2005 10:40:50 -0700 Organization: http://groups.google.com Message-ID: <1121622050.676894.246740@g14g2000cwa.googlegroups.com> References: <1120474891.635131.216700@g44g2000cwa.googlegroups.com> <1121573057.159416.274980@g49g2000cwa.googlegroups.com> NNTP-Posting-Host: 195.162.49.9 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1121622054 752 127.0.0.1 (17 Jul 2005 17:40:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 17 Jul 2005 17:40:54 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=195.162.49.9; posting-account=t4CEmgwAAAA8dL2naG2k3iz_rN__dZy3 Xref: g2news1.google.com comp.lang.ada:3650 Date: 2005-07-17T10:40:50-07:00 List-Id: <<(It also incorrectly passes the Stop parameter using in-mode, >> It was in "out" mode in my example procedure Iterate (Container : Map; Process : not null access procedure (Key : Key_Type; Element : Element_Type; Stop : out Boolean)); << instead of in-out mode, thus forcing the actual subprogram to set the Stop parameter each time, if even you don't want to Stop.)>> We could have one more Iterate procedure without Stop parameter in Process procedure. <> I understand that using of cursors allows to reduce the number of routines in the Ada.Cursors. But i'm sure that using a much more routines without cursors would reduce a potential errors at design time. Using the *checking* cursors would move error detection into the run time. So, I know that i could build whatever i need on top of routines with a cursors. But I think that Ada standard should try to move design process into the way where the errors would be avoided at the design time.