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: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 2001-08-09 15:53:55 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.238.2.15!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> <3B6F312F.DA4E178E@home.com> <23lok9.ioi.ln@10.0.0.2> <3B70AB15.35845A98@home.com> <3B721FF5.B7D854F6@home.com> User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.2.17-21mdksecure (i686)) Date: Thu, 9 Aug 2001 20:10:03 +0200 Message-ID: NNTP-Posting-Host: 194.78.202.248 X-Trace: 997397633 reader0.news.skynet.be 54315 194.78.202.248 X-Complaints-To: abuse@skynet.be Xref: archiver1.google.com comp.lang.ada:11716 comp.lang.c:73275 comp.lang.c++:81386 Date: 2001-08-09T20:10:03+02:00 List-Id: Warren W. Gay VE3WWG wrote: > One Put_Line statement using the Colour'Image() attribute allows me to > conveniently print out the value of the enumerated type in human > readable terms. To do this in C++, you'd either choose between printing > the "integer" value of it, and going back to the include/declaration to > figure out what it was, _or_ you'd have to do: Yes, the debug thing is indeed something i overlooked. I guess that's because I mostly debug using a debugger which gives the alfanumeric names if you watch an enum. >> Not on a serious project no. I use human readable files. > Even to temp files? You live a sheltered life. Probably then. We currently don't need temp files btw. That might change. (But if it's really a temp file, it only has to be readable by the platform who created that file. So there is no problem ignoring endianess, padding and other pitfalls. > I wasn't talking abuse. On 5 different platforms, the sizeof "ab" could > yeild the answers 3,4 or 8, depending upon the platforms chosen ;-) > This is not a very good result for such a simple compiler request. I think you misunderstand the basic design decision that led to this. Implementations are free to choose sizes of basic types for example to maximize speed. That's a valid choice. And because my code doesn't depend on the results of sizeof(...) I obviously prefer the approach where the language implementation selects the optimal representation without me having to worry about it. cu bart -- http://www.irule.be/bvh/