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 16:30:05 PST Path: archiver1.google.com!news2.google.com!newsfeed.google.com!newsfeed.stanford.edu!headwall.stanford.edu!news-out.nibble.net!news-in.nibble.net!newsfeed.direct.ca!look.ca!torn!news.ccs.queensu.ca!not-for-mail From: Chris Wolfe 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. Date: Wed, 08 Aug 2001 19:12:14 -0400 Organization: Queen's University, Kingston Message-ID: <3B71C74E.505A8753@globetrotter.qc.ca> References: <3b690498.1111845720@news.worldonline.nl> <9kbu15$9bj@augusta.math.psu.edu> <3b6a453c.1193942215@news.worldonline.nl> <9keejl$fhj@augusta.math.psu.edu> <3c30da40.0108060848.796d9bd9@posting.google.com> <3B6F3216.F410BBFF@home.com> <3B6F3FAE.B9B9FFCF@globetrotter.qc.ca> <3B6F5BF6.1E22543B@home.com> <3B706538.5AB33833@globetrotter.qc.ca> <3B70BDA5.575D8E6A@home.com> NNTP-Posting-Host: d150-159-162.home.cgocable.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:11650 comp.lang.c:73032 comp.lang.c++:81092 Date: 2001-08-08T19:12:14-04:00 List-Id: "Warren W. Gay VE3WWG" wrote: > Chris Wolfe wrote: > > You stated: "C/C++ _cannot_ provide [runtime checks like boundary > > checks]" > > This is false. The compiler I am using is a proprietary one, but.. > > He he, but the one you are _using_ - does it provide array bounds > checking? Yes, hence its usage as an example of a compiler that supports array bounds checking. The arithmetic checking I use is provided via my inline Integer template. The compiler is quite happy optimizing out the checking on constants. > I suppose you're simply offended by the "_cannot_" remark. Yes, I > suppose that it _is_ possible for a C++ compiler to generate runtime > checks, and even do some limited compile time static checks. But that > is not the general experience. Yes, I am offended by a statement that (insert stereotype here). So why not compare _comparable_ things: like a C++ compiler and library designed with safety in mind against Ada. Rather than a family of languages and libraries designed with ease of implementation and speed in mind? Ah right, that would leave the choice to person preference in syntax and flexibility. > Ok, you can build classes to do array work. In Ada, this is totally > unnecessary for the same level of safety (the safety is inherent > in the language). The compiler inserts the code provided by the Array template into all your code automatically. I wear a seat belt, those who choose to do otherwise... > But my point was, that you won't use this array > when interfacing to pipe(2). You can, and _you_ might, but a lot > of C++ people will not. So we do the Ada thing: throw away the flexibility of the language to force everyone to play safe. In case you missed it, most C++ compiler also provide support for inline assembler: A) if I need it, I can get it. B) if I don't need it, I can stick with the safer stuff. Ada has a very different philosophy. > 2. You now have to prove that your Class Posix is fault free > before you put it on an aircraft or in a medical instrument. Duh, and this was somehow skipped when producing the Ada libraries? I somehow fail to believe that Ada circumvents bugs in the functions provided by my operating system. > You know that it's easy to defend what you know and use. It's > harder to say "maybe there's something there that I should at > least know more about." When coming from a VB and Pascal background Ada looked like a natural extension. Fortunately I looked at C one day and said "maybe there's something there that I should at least know more about." The led to C++, which led to moving many of the useful Ada concepts into classes and templates. Flexibility, conciseness and wide spread use. Oh yes, and my seat belt. Chris