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-08 02:27:40 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!148.122.208.68!news2.oke.nextra.no!nextra.com!news1.oke.nextra.no.POSTED!not-for-mail Followup-To: comp.lang.ada Sender: ohk@maestro.clustra.com 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> <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> <3B6F5BB2.A879B933@worldnet.att.net> <3B7077A3.77D2BBE5@globetrotter.qc.ca> <3B70C621.DC9A8F35@worldnet.att.net> From: Ole-Hjalmar Kristensen Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 194.143.59.98 X-Complaints-To: news-abuse@nextra.no NNTP-Posting-Date: Wed, 08 Aug 2001 11:27:04 MET DST Organization: Nextra Public Access X-Trace: readme.online.no 997262824 194.143.59.98 Date: 08 Aug 2001 11:27:20 +0200 Xref: archiver1.google.com comp.lang.ada:11589 comp.lang.c++:80909 comp.lang.c:72860 Date: 2001-08-08T11:27:20+02:00 List-Id: James Rogers writes: > Chris Wolfe wrote: > > > > So you are sort of correct, there are some features of Ada that > > would require minor changes to the 'default' C++ compiler > > behaviors to provide with the same level of hand-holding provided > > by Ada. I have already encountered compilers that do most of > > these, and I would bet that the rest have been implemented > > somewhere. > > And none of these extensions are actually standard C++. They are not > part of the standard or the standard libraries. This means that you > will need to re-implement them if you are forced to switch to another > compiler because you are porting your code to another system. > > Note that I never claimed that C++ could not produce equivalent > code. I merely stated that I thought it would require a lot more > work, what you called "overwhelming effort". > > Your solutions appear to require the creation of a number of classes > such as Positive, and your Parts_Buf. Of course, the Parts_Buf class > you defined does not begin to implement a protected object, only > a circular buffer. > > The answer "Stock utils lib." is a little vague for me. Which lib > provides the full capabilities of an Ada protected object, > including entry queuing, exclusive update access with multiple > read only access? Which lib provides the same for all common OS > combinations supporting threads, so that recoding is not needed > as part of the porting effort? If you stick to Posix threads, you get what you need, although it's not an exact match with the Ada tasking features. However, in my experience, Posix works better with C than C++, we have been bitten by some really weird bugs related to destructors, statically allocated objects an semaphores. When it comes to tasking, Ada wins hands down if you compare it to C/C++/Posix. > > Your example and explanation clearly convinces me that the C++ > effort to produce an equivalent to an Ada protected object > would require a significant effort. This is not an argument > against C++. This is merely an set of capabilities not yet > implemented as part of the C++ standard. Achieving similar > capabilities is difficult in most languages. > > Jim Rogers > Colorado Springs, Colorado USA -- Kabelsalat ist gesund. Ole-Hj. Kristensen