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,55f6e230b02eff2f X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder3.cambrium.nl!feeder2.cambrium.nl!feeder5.cambrium.nl!feed.tweaknews.nl!68.142.88.75.MISMATCH!hwmnpeer01.ams!news.highwinds-media.com!feed.xsnews.nl!border-1.ams.xsnews.nl!193.141.40.68.MISMATCH!npeer.de.kpn-eurorings.net!npeer1.kpn.DE!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Containers - nontrivial element access 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: <1191275759.184463.238350@n39g2000hsh.googlegroups.com> <1191343440.985588.143470@d55g2000hsg.googlegroups.com> <1191440425.737861.140360@50g2000hsm.googlegroups.com> <1191441364.453874.196900@19g2000hsx.googlegroups.com> <57wwez3fwodt$.yk7zz9dshtus.dlg@40tude.net> <1191451073.734344.241860@r29g2000hsg.googlegroups.com> Date: Thu, 4 Oct 2007 10:06:16 +0200 Message-ID: <1ws7tp5xa9pw9$.w3exctvesrek$.dlg@40tude.net> NNTP-Posting-Date: 04 Oct 2007 10:00:25 CEST NNTP-Posting-Host: 05b256a3.newsspool3.arcor-online.net X-Trace: DXC=jR9:QRldIOEX36K@\WTHGJMcF=Q^Z^V3H4Fo<]lROoRA^;5]aA^R6>B=k>5QV`[:`H[6LHn;2LCVN7enW;^6ZC`DIXm65S@:3>OOj0hP0Sbd0G X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:2290 Date: 2007-10-04T10:00:25+02:00 List-Id: On Wed, 03 Oct 2007 15:37:53 -0700, Matthew Heaney wrote: > On Oct 3, 4:21 pm, "Dmitry A. Kazakov" > wrote: >> > My reason for saying that the C++ vector *is* a like an array, and the > Ada vector is *not* like an array, is that in C++ the vector is > guaranteed to be implemented as contiguous array of memory. There is > a separate container (a deque) that has time and space semantics > different from a vector. [ Does RM require contiguous allocation of arrays? I am not sure.] Anyway, Robert Duff has already expressed what I meant in another subthread: "Vector and array are basically the same thing (except vectors can grow), and it's annoying that you have to use different syntax to deal with them. In Ada, "array" is built in, and has all kinds of cool features (aggregates, with full-coverage checking, for example). It's annoying that vectors can't have all of those features." -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de