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: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 2001-08-07 15:10:01 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.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: Tue, 07 Aug 2001 18:01:28 -0400 Organization: Queen's University, Kingston Message-ID: <3B706538.5AB33833@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> 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:11537 comp.lang.c:72764 comp.lang.c++:80795 Date: 2001-08-07T18:01:28-04:00 List-Id: "Warren W. Gay VE3WWG" wrote: > > > Egad... my compiler's fictional! I suppose C and C++ _cannot_ > > provide garbage collection either? Or automatic serialization, or > > range-checked arithmetic types, or anything else that the > > compiler writer decides to include. > > Well, tell us just _what_ compiler you are using, and just how it > addresses the identified issues. You have done neither :) You stated: "C/C++ _cannot_ provide [runtime checks like boundary checks]" This is false. The compiler I am using is a proprietary one, but with a search on Google for C AND "array bounds checking" I found a list of public ones (including a patch for GCC). Automatic serialization, range-checked arithmetic types and garbage collection are a sampling of other features I have run across in C-like compilers. > > It does not require any overwhelming work to convert an Ada > > program directly into a functionally identical C++ program using > > appropriate (non-standard) templates. > > We're we talking about doing "conversions"? Let's stick to the > discussion here, if you want to respond to "points made". By definition, C++ (or C, or assembler) is capable of expressing any concept that Ada is capable of. My assertion is that the capabilities of C++ make possible a library that is semantically identical to Ada's. Hence, using appropriate (non-standard) templates, it does not require overwhelming work to convert an Ada program directly into a functionally identical C++ program. > > Amazingly these templates > > also tend to spawn safe versions of the standard C functions. > > What was that drivel about pipe again? > > Spawn? Templates? Show us how this solves the problems identified, > and maybe we'll be enlightened. Again.. no substance to your post :) // Implement safe completely dynamic array here template class Array { ... }; class Posix { // ... // Safe pipe, as Array checks bounds int pipe(Array &); // ... }; > > I have no issues with propaganda, but it being blatantly wrong is > > somewhat annoying. > > I challenge you to show us just "how blatantly wrong" I am. I can > handle being wrong. Just ask my wife ;-) There is only one possible 'Ada is better' argument: That something in the Ada libraries can not be provided cleanly by C++. As was observed earlier, C++ is far from uniform. The STL string classes do not bounds check, Microsoft's CString checks in debug mode, and the string class I am using as part of my utils lib checks unless explicitly switched into no-checking mode. Chris