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,1fa85f3df5841ae1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news2.google.com!proxad.net!proxad.net!62.253.162.218.MISMATCH!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe3-win.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Ada.Containers.Vectors - querying multiple elements User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada References: <426e4c2b$0$7515$9b4e6d93@newsread2.arcor-online.net> <1114530273.185327.319710@z14g2000cwz.googlegroups.com> <1114531544.32583.142.camel@localhost.localdomain> <426E72C3.9070108@on2.com> <426e90ef$0$10506$9b4e6d93@newsread4.arcor-online.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Tue, 26 Apr 2005 21:47:37 GMT NNTP-Posting-Host: 80.4.127.115 X-Complaints-To: http://www.ntlworld.com/netreport X-Trace: newsfe3-win.ntli.net 1114552057 80.4.127.115 (Tue, 26 Apr 2005 22:47:37 BST) NNTP-Posting-Date: Tue, 26 Apr 2005 22:47:37 BST Organization: ntl Cablemodem News Service Xref: g2news1.google.com comp.lang.ada:10738 Date: 2005-04-26T21:47:37+00:00 List-Id: On Tue, 26 Apr 2005 21:05:28 +0200, Georg Bauhaus wrote: > Duncan Sands wrote: > >> But (IMHO) grabbing a "slice" of a >> vector is a very normal thing to want to do. Why not support it as >> efficiently as possible? > > I'm curious. Where is slicing a dynamically sized vector > done frequently? recursive algorithms! (and plenty of other places too.) (this was discussed in the endless C++/Ada rant a few weeks ago. Slicing arrays, and using array attributes 'First, 'Last obviate the need for extra parameters. Of course, the C++ enthusiasts didn't seem to be impressed. To work properly, arrays need to be able to start from any index, of course.) I agree with Duncan's point. It would be good to have in the Vectors containers. I rather hoped Vectors could do everything that Arrays could. I'm disappointed. Adrian -- Dr. Adrian Wrigley, Cambridge, UK