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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd45e29f9dafca87 X-Google-Attributes: gid103376,public From: dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner) Subject: Re: bitwise comparators Date: 2000/01/17 Message-ID: <85vr1s$9qe1@news.cis.okstate.edu>#1/1 X-Deja-AN: 573896800 References: <3880D375.7E363123@hotmail.com> <38829638.0@news.pacifier.com> <3882FC1C.2BA8C959@hotmail.com> <85vmn2$ki1$1@nnrp1.deja.com> <38836CF2.AB738B8B@hotmail.com> Organization: Oklahoma State University User-Agent: slrn/0.9.6.2 (Linux) Reply-To: dstarner98@aasaa.ofe.org Newsgroups: comp.lang.ada Date: 2000-01-17T00:00:00+00:00 List-Id: On Mon, 17 Jan 2000 20:26:42 +0100, Alexander Van Hecke wrote: >This seems like an attack on C/C++! I'm sorry, but I have to react on this > >> Ada has >> packages, > >C was ment to be used modular and for reuse : put your code in separate .c >and .h files. int mktemp() can conflict with something in another file. No use of header files can fix that. David.library.mktemp never will. > >> private types, > >C has that! C has access control? Where? >> exceptions, > >you can program exceptions in C. But it doesn't have them, and good exception handling needs to be handled by the compiler. >> generics, > >use structs and callback functions and you have perfect generic types! No type safety, large runtime overhead, and poor readibility is perfect? >> tasks, > >threads Which aren't a part of C, and most thread libraries aren't portable among systems (Unix -> Windows -> Mac -> bare hardware). >With true arrays, do you mean out of bound checking, etc? This can be done >with _proper_ programming in C! So in other words, with enough work, you can add real arrays to C? The point is you have to add them, they don't come with the language. >none of which are found in C. >^^^^^^^^^^^^^^^^^^^^^^^ >ahum. It's correct. Because you can add them, doesn't mean they're found in the language. >> C just has integers, floating-point numbers, pointers, and functions, so >> of course Ada takes >> longer to learn. >> >> Ada makes creating and using abstractions easier than C (packages for >> encapsulation and information hiding; private types for information >> hiding). > >Would you agree that C++ is just as good in that as Ada. No. >Don't forget that >ANY C++ code can be easily translated into C? No. With sufficent work, C++ code can be translated into C, but you're going to rewrite several core systems in process. You're going to have to munge names, write vtables and all sorts of grungy stuff. >For that matter, everything else you mentioned (namespace control, (easy) >generics, exceptions and exception handlers, typing) is easily achieved in >C++ (and thus C). Not and thus C. It's not that simple. And frequently, your implementations are going to be low quality without some very low level and implemenation specific work. -- David Starner - dstarner98@aasaa.ofe.org If you wish to strive for peace of soul then believe; if you wish to be a devotee of truth, then inquire. -- Friedrich Nietzsche