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.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: Gautier Subject: Re: bitwise comparators Date: 2000/01/17 Message-ID: <388394E0.55D1E913@maths.unine.ch>#1/1 X-Deja-AN: 573926129 Content-Transfer-Encoding: 7bit References: <3880D375.7E363123@hotmail.com> <38829638.0@news.pacifier.com> <3882FC1C.2BA8C959@hotmail.com> <85vmn2$ki1$1@nnrp1.deja.com> <38836CF2.AB738B8B@hotmail.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 17 Jan 2000 22:15:41 +0100, 130.125.13.32 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-01-17T00:00:00+00:00 List-Id: 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. I feel you miss something. The .h files are just included texts; the `defines' in one can influence another so the inclusion order is delicate; there is no link (apart a moral one) between the .h and the .c and - correct me if I'm wrong - a standard C compiler won't check the integrity between .h and .c ... In addition, the most resources on the Net break your .h <-> .c rule... > > exceptions, > you can program exceptions in C. I never said that C has all these things, > but you can program them, and there are masses of libraries available that > have just what you need. Aaah but are they compatible between each other ? Maybe there are masses of incompatible libraries ? And masses of software component that use these incompatible libraries (I hope no)? Your argument is valid if you're toying with _your_ exceptions, on _your_ PC... So C hasn't this feature; it can be simulated, with some effort. Ada has it. So, where is the problem ? You could invent a language without subprograms and say: <>... Without loops: <>. Without types at all - detected at run-time. Such regressive trends exist, but (1) does it help the programmer and (2) does it lead to efficient code (optimized subtypes, generics, exceptions, inlining) ? > > generics, > use structs and callback functions and you have perfect generic types! You imagine a rather inefficient way to implement generics. Try the _real_ genericity and see how an Ada compiler instanciates it at compile-time, optimized... Wouldn't a C macro better fit (question) ? Too much energy for holy war tonight - I prefer programming. My advice: Take some time to learn the <>, take a week to toy with Ada (the programming language, I mean), make _your_ idea if you can! -- Gautier _____\\________________\_______\ http://members.xoom.com/gdemont/