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: 15 Jul 2005 11:03:44 -0700 Organization: http://groups.google.com Message-ID: <1121450624.207988.262710@g14g2000cwa.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> <1120759007.967336.187840@g47g2000cwa.googlegroups.com> <42cda8db$0$22780$9b4e6d93@newsread2.arcor-online.net> NNTP-Posting-Host: 195.162.49.9 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1121450629 11363 127.0.0.1 (15 Jul 2005 18:03:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 15 Jul 2005 18:03:49 +0000 (UTC) In-Reply-To: <42cda8db$0$22780$9b4e6d93@newsread2.arcor-online.net> 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:3637 Date: 2005-07-15T11:03:44-07:00 List-Id: << Else nothing demonstrates that Adaified STL style algorithms must be a desaster. >> So Ada.Containers is an "Adaified STL". Cursors in the C++ STL looks normally, because it looks like high level analog of the pointer arithmetic. I don't think that such analog should be ported into Ada, where was no pointer arithmetic due to the safety reasons. I think runtime checks of the Ada cursors is worse then do not use the cursors at all. If programmer want to keep pointer to container elements in the somewhere else, he should put elements into container dynamically allocated, and have an access to it whereever he need.