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,55f6e230b02eff2f X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!19g2000hsx.googlegroups.com!not-for-mail From: Matthew Heaney Newsgroups: comp.lang.ada Subject: Re: Containers - nontrivial element access Date: Wed, 03 Oct 2007 12:56:04 -0700 Organization: http://groups.google.com Message-ID: <1191441364.453874.196900@19g2000hsx.googlegroups.com> References: <1191275759.184463.238350@n39g2000hsh.googlegroups.com> <1191343440.985588.143470@d55g2000hsg.googlegroups.com> <1191440425.737861.140360@50g2000hsm.googlegroups.com> NNTP-Posting-Host: 66.162.65.129 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1191441364 5000 127.0.0.1 (3 Oct 2007 19:56:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 3 Oct 2007 19:56:04 +0000 (UTC) In-Reply-To: <1191440425.737861.140360@50g2000hsm.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 19g2000hsx.googlegroups.com; posting-host=66.162.65.129; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:2275 Date: 2007-10-03T12:56:04-07:00 List-Id: On Oct 3, 3:40 pm, Maciej Sobczak wrote: > > Now I want to do the same with vector. You can -- but you must use a different syntax (as I showed in my previous post). > In other words, I want to use Ada in the Ada spirit. > What kind of mess do you recommend to achieve it? Well, I don't know if I would describe the technique as "a mess", but it can be done using nested invocations of Update_Element. > If we realize that vector is a generalization of array, No, not really. (That would be more true of the C++ STL vector container.) In the Ada case, a "vector" is simply a container that directly supports random access. > is it > revolutionary to expect that the common functionality should have > common interface? But a vector (in Ada) is not a generalization of an array, so the analogy doesn't hold.