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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!post.news-service.com!news1.surfino.com!not-for-mail Message-Id: <4952804.Myubg7stsI@linux1.krischik.com> From: Martin Krischik Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Reply-To: martin@krischik.com Date: Sat, 12 Mar 2005 11:43:55 +0100 References: <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <87is4598pm.fsf@insalien.org> <1110054476.533590@athnrd02> <1110059861.560004@athnrd02> <422b6d49.1141887367@news.xs4all.nl> <1110266099.441421.179290@o13g2000cwo.googlegroups.com> <1110332933.587110.260410@z14g2000cwz.googlegroups.com> <1110390097.532139.43430@f14g2000cwb.googlegroups.com> <422f3808$0$30165$ba620e4c@news.skynet.be> <1110409958.685759.249420@g14g2000cwa.googlegroups.com> <15SdnYvJ0_x3Vq3fRVn-3Q@megapath.net> <1110522060.091940.178510@l41g2000cwc.googlegroups.com> <1110556346.841594.212520@z14g2000cwz.googlegroups.com> Organization: None User-Agent: KNode/0.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@surfino.com NNTP-Posting-Host: 83.169.175.19 (83.169.175.19) NNTP-Posting-Date: Sat, 12 Mar 2005 12:00:15 +0100 X-Trace: 99b3f4232cbbff60c0ab625063 Xref: g2news1.google.com comp.lang.ada:9209 comp.lang.c++:45280 comp.realtime:1344 comp.software-eng:4911 Date: 2005-03-12T11:43:55+01:00 List-Id: Jerry Coffin wrote: > Pascal Obry wrote: >> "Jerry Coffin" writes: >> >> > Your claim of fewer bugs is just the sort of unsupported anti-C >> > comment we see all the time. >> >> Just plain wrong, there is data (a PHD) see >> http://www.adaic.com/whyada/ada-vs-c/cada_art.html > > Perhaps you should reread this, paying paritcular attention to the > dates involved. According to the paper, they started switching from C > to Ada around 1986. C wasn't standardized until 1989, and (as you'd > expect) it was some time after that before most compilers implemented > the standard language. Did they? Or did they just implemented some 80% of the new features? My experience with C/C++ (and I have 10 years + of that) is that at no time there was a fully compiant C compiler available. There where allways a lot of compiler avaliable who claimed to be almost complinant - but never one which realy was. Partily because - unlike Ada (http://en.wikipedia.org/wiki/ISO_18009) - there is not official testsuite to test a C/C++ compiler and runtime library. Such an official testsuite would do C/C++ all sorts of good. > By 1990 or so when compilers conforming reasonably closely with the C > standard became available, it appears likely that essentially all new > development was being done in Ada. Under the circumstances, it would be > rather surprising if the C code was ever rewritten into standard C. On the last project I was working with a 3rd party library which had not a single "const" in its header files - probably to be compatible with old compilers. So a major "savety" feature of C89 was still missing in current code - and affected our current development - since I has to use that library. > In short, this is not a comparison to the C language as it exists > today, or has existed in well over a decade. What do you mean by "exists today"? C99 is 5 years old and still no compiler is available which support all C99 features. "restrict" - missing in MS-C (even thrue restrict can be implemented as "no operation") - VA - arrays (savety critical feature) - missing in MS-C, buggy in GCC. The most compatible C/C++ compiler AFAIK is digital mars (http://www.digitalmars.com) with "only" 4 C99 features missing: (http://www.digitalmars.com/ctg/ctgLanguageImplementation.html#c_unimplemented). But even digital mars aims only at the C++98 and not the current C++ 2003. And there are still 4 features missing: (http://www.digitalmars.com/ctg/ctgLanguageImplementation.html#cpp_unimplemented). > If anything, based on my own experience with standard C vs. > pre-standard C, I'd say his study shows rather the opposite of what you > think it does. Standard C was enough of an improvement over > pre-standard C that it would be rather surprising if standard C didn't > beat Ada in most areas studied (the primary exception being code > reuse). Maybe just maybe - if there realy was any standart compiler available - but there isn't - the C/C++ compiler vendors are allways one release behind the actual ISO standart. > By contrast, comparing modern C++ to the pre-standard C shows _large_ > improvements in nearly all areas. This is due in part to the changes in > the language itself, but perhaps even more so to improved understanding > of how to use the language. True - the former slim languages designed by individuals have become fad languages desined by the ISO commitie ;-). It is true that a programming language need some minimum features set to be usefull. And that feature set is a lot larger then most belive. If a successfull language does not provide that set it will be bolted on later. If anything the current C/C++ ISO standards clearly show that the advocates for slim languages hat been wrong all along. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com