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-11 09:09:09 PST Path: archiver1.google.com!news2.google.com!newsfeed.google.com!newsfeed.stanford.edu!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> <9kp9n7$ivm$1@nh.pace.co.uk> <3B722166.AFBFE73A@home.com> <3B7329A2.959E04B4@home.com> <3B73F747.D44DA95B@home.com> User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.17-21mdksecure (i686)) Date: Sat, 11 Aug 2001 11:00:14 +0200 Message-ID: NNTP-Posting-Host: 194.78.202.248 X-Trace: 997545947 reader1.news.skynet.be 62252 194.78.202.248 X-Complaints-To: abuse@skynet.be Xref: archiver1.google.com comp.lang.ada:11792 comp.lang.c:73596 comp.lang.c++:81781 Date: 2001-08-11T11:00:14+02:00 List-Id: Warren W. Gay VE3WWG wrote: > I think most of them will also support C++ APIs now, but I don't > know of any off of the top of my head, that will load a column > value into std::string yet. That is not a problem because there is a conversion operator for c-str to std::string. >> >> pipe(&my_vector[0]); >> > OK, but will your junior programmer you just hired do that? Really? >> He probably will, but he will also probably not know that is >> a potentially unspecified thing :) > I don't understand your "potentially unspecified thing" remark, but Formally the standard does not specify that the above has too work. It's defect in the standard because the intent is/was that it should work. Thus a conforming implementation can be written for which the above leads to undefinied behaviour (read crashed). > what I have noticed is that people that are struggling with any new > language end up using very basic features, until it starts to become > 2nd nature to them. You can bet they will probably use C type arrays > at the start, because it is a simpler thing to start with and to know. > After all, this is what they'll have learned first. That's because they take a bad approach to learning C++. Stroustroup and other eminent C++ writers have warned about this kind of thing. Well written books like 'Accelerated C++' will teach you the STL first. >> 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. >> 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) >> 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. >> In C++ you use a real generic object to represent an array. > You can in Ada also btw, but it is not necessary. I know, I understand generics where kind of born in Ada. cu bart -- http://www.irule.be/bvh/