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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 2001-08-08 15:43:00 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!louie!not-for-mail Sender: - From: Bart.Vanhauwaert@nowhere.be Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ References: <3b690498.1111845720@news.worldonline.nl> <9kbu15$9bj@augusta.math.psu.edu> <9kbvsr$a02@augusta.math.psu.edu> <3B69DB35.4412459E@home.com> <9kp9n7$ivm$1@nh.pace.co.uk> User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.17-21mdksecure (i686)) Date: Thu, 9 Aug 2001 00:34:18 +0200 Message-ID: NNTP-Posting-Host: 194.78.202.248 X-Trace: 997310578 reader1.news.skynet.be 62255 194.78.202.248 X-Complaints-To: abuse@skynet.be Xref: archiver1.google.com comp.lang.ada:11647 comp.lang.c:73015 comp.lang.c++:81086 Date: 2001-08-09T00:34:18+02:00 List-Id: Marin David Condic wrote: > And don't forget 'Range - very useful for "for" loops. And the same thing > works with multiple dimensions as in Some_Array'First (1) or > Some_Array'Range (2) or Some_Array'Length (N). What is really useful here is > that if you avoid coding things with hard references into the array, you can > pretty much leave the code untouched if/when you make any changes to the > sizes/indexes of the array. It gets even more useful when trying to write > generic array utilities or utilities that can deal with a *slice* of an > array. (Like: "Some_Procedure (Some_Array (6..23)) ;" - if the internals use > the attributes, it works nicely for any slice.) I am not really sure where this is fundamentally different from for (std::vector::iterator i=v.begin(); i!=v.end(); ++i) ... and Some_Procedure(v.begin()+6, v.begin()+23); and v.size() (Btw, as an application programmar, I get supicious whenever I see a fixed size array. It means some arbitrary limit (or arbitrary waste of resources) that some user eventually will stumble upon and of course complain) cu bart -- http://www.irule.be/bvh/