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: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-11 11:19:39 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!headwall.stanford.edu!feeder.via.net!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc2.on.home.com.POSTED!not-for-mail Message-ID: <3B757745.8DCA60D9@home.com> From: "Warren W. Gay VE3WWG" X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; 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> <9kp9n7$ivm$1@nh.pace.co.uk> <3B722166.AFBFE73A@home.com> <3B7329A2.959E04B4@home.com> <3B73F747.D44DA95B@home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 11 Aug 2001 18:19:39 GMT NNTP-Posting-Host: 24.141.193.224 X-Complaints-To: abuse@home.net X-Trace: news1.rdc2.on.home.com 997553979 24.141.193.224 (Sat, 11 Aug 2001 11:19:39 PDT) NNTP-Posting-Date: Sat, 11 Aug 2001 11:19:39 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:11795 comp.lang.c:73616 comp.lang.c++:81801 Date: 2001-08-11T18:19:39+00:00 List-Id: Bart.Vanhauwaert@nowhere.be wrote: > >> Will your junior programmer you just hired program Ada? Really? > > Very likely, because 'First, 'Last and 'Length are part of the language > > You live in a different world. A junior programmer does generally > not know anything about Ada. It is apparently becoming increasingly popular at Universities. I am not inventing this-- there are refs to this on the net. Even head hunters in Ontario are aware of this, and we're not a US defence type of "area". In fact, even Ada jobs are becoming more prevalent (but still a small segment). > >> Look : you are coming from an Ada background where arrays are > >> augmented up to a point where they became a generic object. > > Whoa! Be careful about your assumptions. I've built my career > > on C/C++, so don't assume that I come from an Ada background. > > It strikes me as odd that given you have build a career on C/C++ > that you manage to make so many basic mistakes, don't know > even the basic facts about std::string (see above) and admit > never have seen a very, very basic construct with std::vector > earlier in this thread. No way you have done serious work > in C++ (C maybe, but we all know these are very different > languages) First let me formally address your remark from another post : >> It is true that unless they did something wacky like make it virtual, the >> C++ inline ++ operator is usually cheap. > >Look, you obviously don't know C++ that well, so please refrain from >going into details and trying to pin C++ as a potentially >non-optimizeable language on your assumptions which are FALSE. >There is no question of virtual dispatch in this case as any >junior C++ programmer will be able to tell you. You chose to apply my response to an issue that _you_ have assumed, because it was a personal advantage to you. You then chose to go beyond that and make what I consider rather unfriendly remarks. Call me human, but it put me "off". If I had responded to the remarks at the time, I would have put you and others _off_. I can now look at it from a distance ;-) My response was to a more "general case", since Ted was discussing operator ++() as it is treated in C++, although admittedly in the loose context of the STL. Perhaps I should have made that clearer, but I think your response was unfair and rather unkind. Finally, I won't get into a "what you know vs what I know" kind of debate. This would be counter-productive by anyone's standards. Nobody cares either. There may be no question of no "virtual dispatch" in a specific instance of a STL library component. You may have assumed a vector class (or some other), but I was speaking in C++ general terms about the efficiency of operator ++(). Again, addressing Ted's remarks. So if you reconsider the general case, then yes, you will have to admit that of course you can have a virtual operator ++() if you should have a reason for it (I can't imagine one, but when you talk about languages and features, you don't always care about practical uses). As for knowledge of the STL: I'll freely admit that I am no expert on the STL. While you may have the priviledge to work with STL on your projects, some of us are still maintaining older projects, with older products. Hence you can then understand why I don't consider C++ to be directly liked with the STL (and another reason for it follows). I have used the STL in the Linux/FreeBSD context, though not extensively. Part of the reason is the GNU version of it is not complete nor stable (in terms of changes). I don't like developing software on a changing "platform". I do expect that the GNU version of the STL will mature with time, and I look forward to it (though I'll likely stick with Ada for most of my Open Sourced work). I have since been converted to Ada, and so I see even less reason to go back to the STL, except where my employer may permit me to use it (ie. making it available, and barring any use of Ada). For my own development, I personally feel that Ada not only gives me a superior result and saves me time, it also naturally encourages better design and modularity. Well goody for me, I know. So I hope this helps your understanding ;-) (emphasis on smiley) > >> But > >> only with different syntax on calling the operators than on > >> a real object. > > You keep side-stepping the issue, which is: > > Ada has safety built into the language. > > C++ does not, and users must rely on a library to get safety, > > from a library like the STL. > > Yes. But you have not yet proven that one is better than the other. Well, I may have not done a "convincing" job, but I would think that it would be somewhat self evident (not necessarily a "proof"). For me to take Ada seriously, did not take "proof". It only took a reasonable assurance. The "proof" is coming out in the subsequent experience (I don't believe there is any real substitute for experience). If I may summarize with an analogy it would be thusly : C++ requires you to wear a leather jacket and a helmet (STL) to drive your the car. I am suggesting that neither is necessary in Ada, and hence it is much more comfortable to drive a car without a leather jacket and helmet. (Safety is already inherent in the language). Both may tend to the same result, but one is clearly more comfortable than the other. A comfortable driver probably encourages better results, if I extend the analogy further. Anyway, you'll no doubt discount the analogy as flawed, and so be it if you must. I am just honestly trying to get you (and hopefully others) to give honest consideration to the differences and advantages that may exist in Ada. If after you truly investigate it, and you still disagree, then I won't lose any sleep over it. Hopefully however, you will be a little better informed by the process. Most people tend to just stay with what they know however, and it sometimes takes a little push to get folks to look at something new or improved. Especially when marketing says C++ > Ada95. But Ada95 is definitely in the well _improved_ category, since much experience was gained from the original Ada83 language. [I'm going back to lurking, since my vacation is ending] :< For your own benefit (not mine), I hope that you someday take the time to find out for yourself about Ada95 -- first hand. -- Warren W. Gay VE3WWG http://members.home.net/ve3wwg