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: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-07 15:44:19 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn4feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3B706FDC.E965C526@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. References: <3b690498.1111845720@news.worldonline.nl> <9kbu15$9bj@augusta.math.psu.edu> <9kbvsr$a02@augusta.math.psu.edu> <3B69DB35.4412459E@home.com> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 07 Aug 2001 22:44:19 GMT NNTP-Posting-Host: 12.74.161.245 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 997224259 12.74.161.245 (Tue, 07 Aug 2001 22:44:19 GMT) NNTP-Posting-Date: Tue, 07 Aug 2001 22:44:19 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:11542 comp.lang.c:72771 comp.lang.c++:80803 Date: 2001-08-07T22:44:19+00:00 List-Id: Bart.Vanhauwaert@nowhere.be wrote: > > Warren W. Gay VE3WWG wrote: > > And BTW, knowing the array bounds is not a problem. That is why Ada > > provides convenient attributes like My_Array'First and My_Array'Last > > (PL/I did it with builtin functions like lbound(My_Array) and hbound(My_Array) > > IIRC). > > And as we all know, lazy programmers will not use 'First and 'Last, > but will assume it's 0. > Nonesense. There is no reason at all for an Ada programmer to assume an array begins at 0. In fact, most of the Ada arrays I have written or used begin at 1. Now why would anyone start counting at 1? The default 'First for a string constant is 1. It is most likely that a lazy Ada programmer will assume 1 as the starting point of all arrays. If the array starts at 1 and the lazy programmer assumes a start at 0 the compiler or the run time will catch the problem. If the index is a constant the compiler will catch the problem with a serious error message. If the index is a variable the compiler may catch the problem, or it may have to wait for the run time checks, depending upon how the array index is defined. Either way you will find the program either will not compile, or will abruptly terminate with an explanation of the nature of the error. The lazy Ada programer will quickly have his or her lazyness corrected. > >> Minor advantage. Totally ofset by the fact that serious software needs > >> internationalization anyway. If really needed, a gross #define hack > >> does the trick. > > You said it best -- "gross". ;-) It is also "error prone", which is one > > reason why Ada makes this service available. > > And you left out the beef of my argument of course : real software > needs internationalization anyway, rendering this feature totally > useless. What built-in support does C++ have for international character sets? What is the name of the Unicode character set in C++? Without such support internationalization is pretty difficult. Jim Rogers Colorado Springs, Colorado USA