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: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 2001-08-08 15:42:54 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> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> <3B706FDC.E965C526@worldnet.att.net> User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.17-21mdksecure (i686)) Date: Wed, 8 Aug 2001 23:55:33 +0200 Message-ID: NNTP-Posting-Host: 194.78.202.248 X-Trace: 997310572 reader1.news.skynet.be 62255 194.78.202.248 X-Complaints-To: abuse@skynet.be Xref: archiver1.google.com comp.lang.ada:11645 comp.lang.c:73013 comp.lang.c++:81084 Date: 2001-08-08T23:55:33+02:00 List-Id: James Rogers wrote: > 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? Good question. I always count 0,1,2,..,n-1. (I guess you meant why would anyone start counting at 0?) > 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. While the C programmer wouldn't see this problem at all because his arrays start at 0? >> 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. Just note you changed the settings from discussing a possible Ada advantage to possible C++ disadvantages. But you have a valid point. Theoretically there is no basic type that directly maps to unicode. There is whar_t but it is only guaranteed to be large enough to hold the largest character set supported by the implementation's locale. So there is support for international character sets although not specifically for unicode. That being said. You assert that without that direct support i18n is pretty difficult, which is untrue. The internationalization support for C/C++ implementations on both Microsoft and Unix is quite extensive. Enough tools exist to make the effort painless _and_ nearly transparant to the programmer and the translators. Point in case thousands of (desktop) applications fully translated to nearly every imageable language. As I've said before : what imperfections or design tradeoffs there might be in C/C++ as a language, that's largely made up with the extensive platform support it receives. cu bart -- http://www.irule.be/bvh/be/politics