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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bb7cc916bd63ab43 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Performance of element access in Vector Followup-To: comp.lang.ada Date: Fri, 23 Jan 2009 15:56:35 +0100 Message-ID: <6tu45jFcibgkU2@mid.individual.net> References: <0a8baaf0-19f7-40c0-a041-884e93fa7020@w39g2000prb.googlegroups.com> <1fp3pbmn4q3o5.1b0fk6lircbld.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: individual.net 9i2ms/IJaI8wCY6AUjL43Ale3aSrCqEV28h9JctdnbQjTmjbI= Cancel-Lock: sha1:w5cwJC3xh90FWnflQ7mir67sg1Y= User-Agent: KNode/0.99.01 Xref: g2news1.google.com comp.lang.ada:3484 Date: 2009-01-23T15:56:35+01:00 List-Id: george.priv@gmail.com wrote: > On Jan 20, 3:26 am, "Dmitry A. Kazakov" > wrote: >> On Tue, 20 Jan 2009 00:03:03 -0800 (PST), Maciej Sobczak wrote: >> > The difference is, however, that it is possible to use vectors in C++ >> > without going into undefined behavior, whereas it seems to be >> > impossible to use Vectors in Ada without being slow. >> >> There might be something wrong with the concept they share... >> >> -- >> Regards, >> Dmitry A. Kazakovhttp://www.dmitry-kazakov.de > > Unlike C++ for simple objects I don't see advantage of using vectors > vs. arrays in Ada. Only that it provide uniform ways to traverse > through all containers? Anything else I am missing? I like the ability to store unconstrained/classwide types. Basically it saves you the need of using a wrapper or access type. Take for example the basic newbie-head-scratching array of "strings".