Re: Teaching new tricks to an old dog (C++ -->Ada)
From: Martin Krischik (martin_at_krischik.com)
Date: Sat, 12 Mar 2005 11:43:55 +0100
Jerry Coffin wrote:
> Pascal Obry wrote:
>> "Jerry Coffin" <firstname.lastname@example.org> 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
> 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 <small>almost</small> 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
> 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:
But even digital mars aims only at the C++98 and not the current C++ 2003.
And there are still 4 features missing:
> 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
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.
-- mailto://email@example.com Ada programming at: http://ada.krischik.com