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!g47g2000cwa.googlegroups.com!not-for-mail From: "Dmitriy Anisimkov" Newsgroups: comp.lang.ada Subject: Re: GCC 4.0 Ada.Containers Cursor danger. Date: 7 Jul 2005 10:56:48 -0700 Organization: http://groups.google.com Message-ID: <1120759007.967336.187840@g47g2000cwa.googlegroups.com> References: <1120474891.635131.216700@g44g2000cwa.googlegroups.com> <1120575076.876798.108220@g44g2000cwa.googlegroups.com> <1120583470.429264.325450@g43g2000cwa.googlegroups.com> <1120639461.224146.235430@g44g2000cwa.googlegroups.com> <1120642489.101644.74190@o13g2000cwo.googlegroups.com> <1120643138.031761.212450@g43g2000cwa.googlegroups.com> <42cbb52c$0$10807$9b4e6d93@newsread4.arcor-online.net> <1120666922.733581.179180@g47g2000cwa.googlegroups.com> <42cc1f0f$0$10808$9b4e6d93@newsread4.arcor-online.net> <1120739383.801736.224270@o13g2000cwo.googlegroups.com> <42cd343b$0$22784$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Host: 80.89.131.48 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1120759013 22026 127.0.0.1 (7 Jul 2005 17:56:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 7 Jul 2005 17:56:53 +0000 (UTC) In-Reply-To: <42cd343b$0$22784$9b4e6d93@newsread2.arcor-online.net> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g47g2000cwa.googlegroups.com; posting-host=80.89.131.48; posting-account=t4CEmgwAAAA8dL2naG2k3iz_rN__dZy3 Xref: g2news1.google.com comp.lang.ada:11942 Date: 2005-07-07T10:56:48-07:00 List-Id: << > generic > procedure Process (Key : Key_Type; Value : Value_Type; Stop : out If you are worried about Ada 2006's Iterate using Cursors internally (in the Process procedure), what makes you sure that the programmers writing the procedure for Process in Generic_Iterate above will not use the wrong key in their procedure? >> Because they get it in "in" parameter from library, they do not have any reason to change it. <> For sure. There is only 2 possible situations, found/not found. Some routines could raise exception if not found. others raise exceptions in found, others returns boolean value depend on found or not found.