C popularity – C / C++

  c

Q(Question):

Some postings in this newsgroup over the past few months have questioned the
popularity of the C programming language.

For what it’s worth, the “Reader’s Choice Awards 2008” from _Linux
Journal_ shows that C was voted the favorite programming language, slightly
ahead of both C++ and Java:

http://www.linuxjournal.com/article/10065

My experience on the Linux platform is that C is still widely used, not just
in the kernel and device drivers but also in userland, too.

A(Answer):

Bob Nelson <bn*****@nelsonbe.comwrites:

>Some postings in this newsgroup over the past few months have questioned the
popularity of the C programming language.

Yes, popularity of a programming language means many different things
to many different people. Those unaware of it may be interested in the
monthly TIOBE Programming Community Index:

http://www.tiobe.com/index.php/conte…pci/index.html


Chris.

A(Answer):

"Chris McDonald" <ch***@csse.uwa.edu.auwrote in message
news:fv**********@enyo.uwa.edu.au…

Bob Nelson <bn*****@nelsonbe.comwrites:

>>Some postings in this newsgroup over the past few months have questioned
the
popularity of the C programming language.

Yes, popularity of a programming language means many different things
to many different people. Those unaware of it may be interested in the
monthly TIOBE Programming Community Index:

http://www.tiobe.com/index.php/conte…pci/index.html

C is by no means an "unpolular" language, or relegated to the lands of
"embedded systems" and "device drivers" as some people seem to imply.

now, it is by no means an unchallenged emporor, nor is it some
long-forgotten prince either…
here are my current views:

AFAIK, C, C++, and Java are the top languages for most general software
development at this point in time.

AFAIK, C is dominant on Linux and in opensource land, C++ is dominant in
windows land, and Java is dominant, somewhere (I know somewhere or another a
lot is going on in Java, but IME it is a little like a phantom, so often
heard about but not as often seen…).

C has a lot of good points IMO, and I think is fairly likely to stay around
(for what it does well, it does very well, and its detractors tend to be
more pedantic than pragmatic…).

C++ has a lot of good points, but a few detractors as well, and I suspect is
inclined to lose a lot more popularity than it will gain (its "high level"
and "object oriented" claims to fame have largely transferred to newer
languages such as Java and C#, wheras when lumped in with C, a few of its
detractors show as well, none the less it is still fairly well established
so it will not likely go anywhere soon).

Java, has a few good points and a few detractors (but rather different ones
than C++). why it has done this well is a little curious to me personally,
but is not inconcievable (it has a few ugly spots and annoyances, but is by
no means terrible as a language, especially when it can be observed that a
lot of these things I disliked about Java have been asopted as "good
practice" by many C++ developers…).
C# is a language I am watching personally (D could be similar, but only time
will tell). my prediction is that in time it may come to compete with the
current heavyweights… IMO, C# balances some of the good and bad points of
C++ and Java, and so may have a technical advantage here over both of them
in the long term (and, if not C#, something similar, such as D, albeit D
makes slightly different tradeoffs).

IMO, at this point the biggest strength, and potentially later the biggest
threat, to C#’s success, is its close association with Windows and .NET…
but, as is everything, only time will tell…


Chris.

A(Answer):

"cr88192" <cr*****@NOSPAM.hotmail.comwrote in message
news:7b**************************@saipan.com…

>Some postings in this newsgroup over the past few months have questioned
the
popularity of the C programming language.

Yes, popularity of a programming language means many different things
to many different people. Those unaware of it may be interested in the
monthly TIOBE Programming Community Index:

http://www.tiobe.com/index.php/conte…pci/index.html

C is by no means an "unpolular" language, or relegated to the lands of
"embedded systems" and "device drivers" as some people seem to imply.

now, it is by no means an unchallenged emporor, nor is it some
long-forgotten prince either…

here are my current views:

AFAIK, C, C++, and Java are the top languages for most general software
development at this point in time.

AFAIK, C is dominant on Linux and in opensource land, C++ is dominant in
windows land, and Java is dominant, somewhere (I know somewhere or another

a

lot is going on in Java, but IME it is a little like a phantom, so often
heard about but not as often seen…).

C has a lot of good points IMO, and I think is fairly likely to stay

around

(for what it does well, it does very well, and its detractors tend to be
more pedantic than pragmatic…).

C++ has a lot of good points, but a few detractors as well, and I suspect

is

inclined to lose a lot more popularity than it will gain (its "high level"
and "object oriented" claims to fame have largely transferred to newer
languages such as Java and C#, wheras when lumped in with C, a few of its
detractors show as well, none the less it is still fairly well established
so it will not likely go anywhere soon).

Java, has a few good points and a few detractors (but rather different

ones

than C++). why it has done this well is a little curious to me personally,
but is not inconcievable (it has a few ugly spots and annoyances, but is

by

no means terrible as a language, especially when it can be observed that a
lot of these things I disliked about Java have been asopted as "good
practice" by many C++ developers…).

C# is a language I am watching personally (D could be similar, but only

time

will tell). my prediction is that in time it may come to compete with the
current heavyweights… IMO, C# balances some of the good and bad points

of

C++ and Java, and so may have a technical advantage here over both of them
in the long term (and, if not C#, something similar, such as D, albeit D
makes slightly different tradeoffs).

IMO, at this point the biggest strength, and potentially later the biggest
threat, to C#’s success, is its close association with Windows and .NET…

but, as is everything, only time will tell…


Chris.

I am probably going to be bashed for this but here are my comments:

1. Java is great for cross platform or web type development. My experience
is that it is very popular with corporates.

2. C# and Visual Basic are corporate and/or glue software development.

For writing heavy duty applications, particularly where there is complexity
there, C and C++ are used. My personal preference is for C++ and not really
sure why C is more popular on Linux than on Windows. Maybe Linux is more
used by enginners with a background in C.

Detractors of C++ say C++ is much slower than C at runtime. But the
differences have got to be pretty marginal.

C++ combined with the standard templates library provides much higher
productivity and ‘safety’ than C and productivity is VERY important.

It is all horses for courses anyway. You wouldn’t write a device driver in
Visual Basic just as you wouldn’t write a web application in C.

Hope my comments have been useful.

A

A(Answer):

"Angus" <no****@gmail.comwrote

>
C++ combined with the standard templates library provides much higher
productivity and ‘safety’ than C and productivity is VERY important.

The consenus, after about twenty years, is emerging that object-oriented
programming makes programs brittle, the units too interdependent, and the
relationships too difficult for maintainers to follow.
That’s more or less what some of us have been saying all along, but now we
are hearing it loud and clear from people with influence.


Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

A(Answer):

"Malcolm McLean" <re*******@btinternet.comwrites:

"Angus" <no****@gmail.comwrote

>>
C++ combined with the standard templates library provides much higher
productivity and ‘safety’ than C and productivity is VERY important.

The consenus, after about twenty years, is emerging that
object-oriented programming makes programs brittle, the units too
interdependent, and the relationships too difficult for maintainers to
follow.
That’s more or less what some of us have been saying all along, but
now we are hearing it loud and clear from people with influence.

Oh I do not know.

If one is modelling a shape with X sides it seems to be quite good :-;

A(Answer):

Malcolm McLean wrote:

"Angus" <no****@gmail.comwrote

>>
C++ combined with the standard templates library provides much higher
productivity and ‘safety’ than C and productivity is VERY important.

The consenus, after about twenty years, is emerging that object-oriented
programming makes programs brittle, the units too interdependent, and
the relationships too difficult for maintainers to follow.

The C++ standard template library is not OO.

OO done badly is a mess. Procedural programming done badly is a mess.


Ian Collins.

A(Answer):

On 3 May, 22:07, "Malcolm McLean" <regniz…@btinternet.comwrote:

"Angus" <nos…@gmail.comwrote

C++ combined with the standard templates library provides much higher
productivity and ‘safety’ than C and productivity is VERY important.

The consenus, after about twenty years, is emerging that object-oriented
programming makes programs brittle, the units too interdependent, and the
relationships too difficult for maintainers to follow.
That’s more or less what some of us have been saying all along, but now we
are hearing it loud and clear from people with influence.

That may be true, but what does it have to do with C++ and the STL?

A(Answer):

William Pursell wrote:

"Malcolm McLean" <regniz…@btinternet.comwrote:

>"Angus" <nos…@gmail.comwrote

>>C++ combined with the standard templates library provides much
higher productivity and ‘safety’ than C and productivity is VERY
important.

The consenus, after about twenty years, is emerging that
object-oriented programming makes programs brittle, the units too
interdependent, and the relationships too difficult for
maintainers to follow. That’s more or less what some of us have
been saying all along, but now we are hearing it loud and clear
from people with influence.

That may be true, but what does it have to do with C++ and the STL?

More to the point, what have C++ and the STL to do with
comp.lang.c?


[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **

A(Answer):

"William Pursell" <bi**********@gmail.comwrote

>The consenus, after about twenty years, is emerging that object-oriented
programming makes programs brittle, the units too interdependent, and the
relationships too difficult for maintainers to follow.

That may be true, but what does it have to do with C++ and the STL?

Whilst you can use C++ as a "better C", the usual motivation is to do
object-oriented programming.
Whether you regard the STL as "object-oriented" or not depends on your
terminology. You could hold that objects have to be in inheritance
hierarchies to count, in which case the STL is excluded, or you could use a
losser definition of "objects and methods in relationships with each other",
in which case the STL qualifies, because of the concept of controlled
sequences.


Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

A(Answer):

In message <7b**************************@saipan.com>, cr88192
<cr*****@NOSPAM.hotmail.comwrites

>
"Chris McDonald" <ch***@csse.uwa.edu.auwrote in message
news:fv**********@enyo.uwa.edu.au…

>Bob Nelson <bn*****@nelsonbe.comwrites:

>>>Some postings in this newsgroup over the past few months have questioned
the
popularity of the C programming language.

Yes, popularity of a programming language means many different things
to many different people. Those unaware of it may be interested in the
monthly TIOBE Programming Community Index:

http://www.tiobe.com/index.php/conte…pci/index.html

C is by no means an "unpolular" language, or relegated to the lands of
"embedded systems" and "device drivers" as some people seem to imply.

Relegated to embedded systems? There is more embedded development in
the world that desktop or mainframe… I think there is around 6
million lines of code (and I don’t mean system libraries either) on the
*average* modern car across about 150 MCU from 8-64 bit systems. The
head of Ford’s R&D said last year that about 90% of the value in a car
is now in the SW and embedded electronics.

For Aircraft, trains, signalling systems, building control, industrial
control systems it get bigger. Most of it high-reliability or safety
critical.

There is virtually nothing on the planet that has electrical power near
it that does not have an embedded MCU in it that has at least some C in
it. Look around you. The reason why "most" developers don’t see it is
because it is generally developed by people with an electronics
background and people who don’t tend to hang around with IT "people"

There tends to be very little interaction between the two groups which
leads most "IT programmers" to think the embedded space is small..

In fact most modern PC’s are a collection of embedded systems (hard
drive has a couple of MCU’s, network card, keyboard, mouse, Monitor,
Graphics MCU…. you think they are hardware but all will have an MCU,
FPGA or ASIC that has some C firmware in it.

>now, it is by no means an unchallenged emporor, nor is it some
long-forgotten prince either…
here are my current views:

AFAIK, C, C++, and Java are the top languages for most general software
development at this point in time.

C and C++ are the dominant languages for embedded work too. C has taken
over from Ada on a lot of safety critical systems. C++ is being used on
some high reliability systems (and the JSF)

>AFAIK, C is dominant on Linux and in opensource land, C++ is dominant in
windows land, and Java is dominant, somewhere (I know somewhere or another a
lot is going on in Java, but IME it is a little like a phantom, so often
heard about but not as often seen…).

I would agree.

C will be the dominant embedded language for some time. C++ is creeping
up a bit.
\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

A(Answer):

Chris H wrote:

>

…. snip …

>
C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation. C and C++
do not have the built-in resistance to programming errors that Ada
does. Thus Ada will always produce more reliable code from the
same quality of programmer. Probably from all programmers.

The quasi-advantage of C is that it allows the programmer to do
almost anything he wants, legitimate or not. Often the
illegitimate code will do what is desired on a particular system,
and that is good enough for now. The errors may, or may not, ever
catch up with you.


[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **

A(Answer):

CBFalconer wrote, On 10/05/08 21:41:

Chris H wrote:
… snip …

>C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation.

Chuck, do you actually work in embedded SW? I used to a few years back.
Where I worked C was not used in 1985 and in the late 80s or early 90s I
had a long discussion with my then boss about it. In the early 90s we
had one project in ADA. In the mid 90s we started using C. When I left
there were several projects in C but no additional projects in ADA, so
my experience is that the use of C was on the up in embedded systems
(more specifically systems in the defence industry).

Also C compilers are the easiest to get hold of for embedded systems.

C and C++
do not have the built-in resistance to programming errors that Ada
does. Thus Ada will always produce more reliable code from the
same quality of programmer. Probably from all programmers.

Safety critical work has also been done in assembler, and that gives
even more possibilities for screwing up!

The quasi-advantage of C is that it allows the programmer to do
almost anything he wants, legitimate or not. Often the
illegitimate code will do what is desired on a particular system,
and that is good enough for now. The errors may, or may not, ever
catch up with you.

The kinds of errors that C allows that ADA makes harder to achieve are
also the kinds likely to be picked up in reviews and static analysis,
especially in safety related work. Where the code is such that reviews
and static analysis will not pick up those errors the code is likely to
be rejected precisely because you cannot tell whether those errors are
present!

OK, I only worked on one safety critical project, but when I did I made
damn sure I new the rules since one of them was that I could personally
be sued if I did not follow them and someone was killed as a result!

I also somewhat suspect that Chris Hill knows more about this and what
is going on in the embedded world than either of us!

Flash Gordon

A(Answer):

Flash Gordon wrote:

CBFalconer wrote, On 10/05/08 21:41:

>Chris H wrote:

… snip …

>>C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation.

Chuck, do you actually work in embedded SW? I used to a few years
back. Where I worked C was not used in 1985 and in the late 80s or
early 90s I had a long discussion with my then boss about it. In
the early 90s we had one project in ADA. In the mid 90s we started
using C. When I left there were several projects in C but no
additional projects in ADA, so my experience is that the use of C
was on the up in embedded systems (more specifically systems in
the defence industry).

I used Pascal and Assembly in embedded work since the early ’70s.
Before that I primarily used assembly. The Pascal was entirely
under my control, and met the ISO7185 specification (omitting the
action of passed procedures). I validated it against the industry
standard test suite (which has since disappeared). The results
were used in medical apparatus of the highest standard. Remember
that the Pascal standard appeared in 1979, after a considerable
period of discussion and promulgation of drafts.

Since about 1990 C has been arriving in the embedded world. If I
hadn’t lost my entire system to a disk crash, followed by some sort
of disk loss (theft??) of my backups, I could back all this up with
hard displays.

My embedded machines have appeared in telephones, medical
instruments, medical testing, communications, primarily. This, of
course, is my view, and I can’t really back it up further.

>
Also C compilers are the easiest to get hold of for embedded systems.

Very true. Also for other systems.

>

>C and C++ do not have the built-in resistance to programming
errors that Ada does. Thus Ada will always produce more reliable
code from the same quality of programmer. Probably from all
programmers.

Safety critical work has also been done in assembler, and that
gives even more possibilities for screwing up!

>The quasi-advantage of C is that it allows the programmer to do
almost anything he wants, legitimate or not. Often the
illegitimate code will do what is desired on a particular system,
and that is good enough for now. The errors may, or may not, ever
catch up with you.

The kinds of errors that C allows that ADA makes harder to achieve
are also the kinds likely to be picked up in reviews and static
analysis, especially in safety related work. Where the code is
such that reviews and static analysis will not pick up those
errors the code is likely to be rejected precisely because you
cannot tell whether those errors are present!

Assuming such reviews and analysis are possible. Generally I
worked practically in isolation most of the time, so that hardware
review (i.e. the compilers) was very helpful.

>
OK, I only worked on one safety critical project, but when I did I
made damn sure I new the rules since one of them was that I could
personally be sued if I did not follow them and someone was killed
as a result!

I didn’t have that pressure 30 years ago, but the internal urge was
quite sufficient.

>
I also somewhat suspect that Chris Hill knows more about this and
what is going on in the embedded world than either of us!

Quite likely at present. However his attitude to proper languages
is totally wrong. That doesn’t mean he doesn’t have the ability to
produce valid packages with bad tools. I class any C compiler as a
bad tool due to the language it compiles, not its actual abilities.


[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **

A(Answer):

CBFalconer <cb********@yahoo.comwrites:

Chris H wrote:

>>

… snip …

>>
C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation. C and C++
do not have the built-in resistance to programming errors that Ada
does. Thus Ada will always produce more reliable code from the
same quality of programmer. Probably from all programmers.

[…]

I see no contradiction between Chris H’s statement and yours. He said
that C *has* taken over from Ada, not that it *should*.


Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
— Antony Jay and Jonathan Lynn, "Yes Minister"

A(Answer):

CBFalconer wrote, On 11/05/08 03:45:

Flash Gordon wrote:

>CBFalconer wrote, On 10/05/08 21:41:

>>Chris H wrote:

… snip …

C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)
This is a horrible misstatement of the actual situation.

Chuck, do you actually work in embedded SW? I used to a few years
back. Where I worked C was not used in 1985 and in the late 80s or
early 90s I had a long discussion with my then boss about it. In
the early 90s we had one project in ADA. In the mid 90s we started
using C. When I left there were several projects in C but no
additional projects in ADA, so my experience is that the use of C
was on the up in embedded systems (more specifically systems in
the defence industry).

<snip>

My embedded machines have appeared in telephones, medical
instruments, medical testing, communications, primarily. This, of
course, is my view, and I can’t really back it up further.

I am honestly surprised that you have worked on medical equipment
without reviews and static analysis being a requirement. Unless it is
the less critical stuff such as blood pressure monitors.

>Also C compilers are the easiest to get hold of for embedded systems.

Very true. Also for other systems.

>>C and C++ do not have the built-in resistance to programming
errors that Ada does. Thus Ada will always produce more reliable
code from the same quality of programmer. Probably from all
programmers.

Safety critical work has also been done in assembler, and that
gives even more possibilities for screwing up!

>>The quasi-advantage of C is that it allows the programmer to do
almost anything he wants, legitimate or not. Often the
illegitimate code will do what is desired on a particular system,
and that is good enough for now. The errors may, or may not, ever
catch up with you.

The kinds of errors that C allows that ADA makes harder to achieve
are also the kinds likely to be picked up in reviews and static
analysis, especially in safety related work. Where the code is
such that reviews and static analysis will not pick up those
errors the code is likely to be rejected precisely because you
cannot tell whether those errors are present!

Assuming such reviews and analysis are possible.

If it is not possible then your company will not get the contract to do
safety related work, since the reviews and analysis are contractual
requirements!

Generally I
worked practically in isolation most of the time, so that hardware
review (i.e. the compilers) was very helpful.

I don’t deny that they are helpful, but reviews can be even more
helpful. Even on non-safety critical work I’ve had an assembler module
rejected because it was not commented well enough for the reviewer to
follow (I ended up needing a couple of comments per assembler instruction!).

>OK, I only worked on one safety critical project, but when I did I
made damn sure I new the rules since one of them was that I could
personally be sued if I did not follow them and someone was killed
as a result!

I didn’t have that pressure 30 years ago, but the internal urge was
quite sufficient.

If you were not insisting that third parties review your code, whatever
language it was written in, then your internal urge did not bring you
close to the level I would expect for safety related, let alone safety
critical work.

>I also somewhat suspect that Chris Hill knows more about this and
what is going on in the embedded world than either of us!

Quite likely at present. However his attitude to proper languages
is totally wrong. That doesn’t mean he doesn’t have the ability to
produce valid packages with bad tools. I class any C compiler as a
bad tool due to the language it compiles, not its actual abilities.

As I read it Chris was merely stating which languages are dominant, not
commenting on the relative merits of languages.

Flash Gordon

A(Answer):

In message <48***************@yahoo.com>, CBFalconer
<cb********@yahoo.comwrites

>Chris H wrote:

>>

… snip …

>>
C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation.

Not at all C has taken over a lot from Ada in critical systems.
And C++ is used on JSF in place of Ada (though that I think is a
mistake)

>C and C++
do not have the built-in resistance to programming errors that Ada
does.

Yes.

Thus Ada will always produce more reliable code from the
same quality of programmer.

No. It depends on the process.

Probably from all programmers.

>The quasi-advantage of C is that it allows the programmer to do
almost anything he wants, legitimate or not.

That is NOT an advantage.

Often the
illegitimate code will do what is desired on a particular system,
and that is good enough for now. The errors may, or may not, ever
catch up with you.

True but the same can be said of Ada… not mentioning THAT rocket 🙂


\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

A(Answer):

In message <48**************@yahoo.com>, CBFalconer
<cb********@yahoo.comwrites

>I used Pascal and Assembly in embedded work since the early ’70s.
Before that I primarily used assembly.

Pascal was quite common then. Some of the implementations were
appalling. THEORETICALLY the language was very good but some of the
implementations let it down badly

>Since about 1990 C has been arriving in the embedded world.

It was there some time before that. I know it was in use in the early
1980’s from an0ut 1982 onwards. This is from personal experience.

>If I
hadn’t lost my entire system to a disk crash, followed by some sort
of disk loss (theft??) of my backups, I could back all this up with
hard displays.

You ask us to believe you are a professional working on critical systems
but you have no back ups?

>My embedded machines have appeared in telephones, medical
instruments, medical testing, communications, primarily. This, of
course, is my view, and I can’t really back it up further.

Mine too…

>Also C compilers are the easiest to get hold of for embedded systems.

Very true. Also for other systems.

Such as? Good quality compilers for which languages? I know there are
several (four? 🙂 people using FORTH and some still using Modula 2 and
Pascal even PL/M but nothing that is widely available with good quality
support and test/debugging tools

>>C and C++ do not have the built-in resistance to programming
errors that Ada does. Thus Ada will always produce more reliable
code from the same quality of programmer. Probably from all
programmers.

Safety critical work has also been done in assembler, and that
gives even more possibilities for screwing up!

FADEC ayone? 🙂

>Assuming such reviews and analysis are possible. Generally I
worked practically in isolation most of the time,

That explains a very great deal and I am not surprised. It explains a
lot.

>OK, I only worked on one safety critical project, but when I did I
made damn sure I new the rules since one of them was that I could
personally be sued if I did not follow them and someone was killed
as a result!

I didn’t have that pressure 30 years ago, but the internal urge was
quite sufficient.

The pressure was always there for safety critical?

>I also somewhat suspect that Chris Hill knows more about this and
what is going on in the embedded world than either of us!

Quite likely at present. However his attitude to proper languages
is totally wrong.

You don’t know my attitude to languages. I was stating the FACT that C
is taking over from Ada in a lot of mission and safety critical areas.
Also so is C++ eg on the JSF.

Now if this is good or bad, right or wrong I did not say. The fact is
that C is the dominate language and all the good quality test and debug
tools are available for it.

For any target you care to name there will be high quality C compilers,
static analysers, debuggers/ICE and testing tools. More so than for
any other languages.

Is there a quality Ada available for the 8051 WITH ICE and unit test
tools?

>That doesn’t mean he doesn’t have the ability to
produce valid packages with bad tools.

The calibre of the tools is important. You can get good C compilers and
appalling Pascal ones. I have worked with a Modular 2 system that was
so bad we gave up on it as it would not produce bug free programs due to
compiler bugs. We threw the library out on day 3 it was so bad.

I class any C compiler as a
bad tool due to the language it compiles, not its actual abilities.

That is an appalling statement of bigotry that would render you
unemployable IMHO.


\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

A(Answer):

In message <87************@kvetch.smov.org>, Keith Thompson
<ks***@mib.orgwrites

>CBFalconer <cb********@yahoo.comwrites:

>Chris H wrote:

>>>

… snip …

>>>
C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation. C and C++
do not have the built-in resistance to programming errors that Ada
does. Thus Ada will always produce more reliable code from the
same quality of programmer. Probably from all programmers.

[…]

I see no contradiction between Chris H’s statement and yours. He said
that C *has* taken over from Ada, not that it *should*.

C++ HAS taken over from Ada in the JSF which I think is a bad move. I
will be awaiting the fallout from this project with interest. Given the
number of people working on it the true will leak out eventually
hopefully with no loss of life.

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

A(Answer):

In message <87************@kvetch.smov.org>, Keith Thompson
<ks***@mib.orgwrites

>CBFalconer <cb********@yahoo.comwrites:

>Chris H wrote:

>>>

… snip …

>>>
C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation. C and C++
do not have the built-in resistance to programming errors that Ada
does. Thus Ada will always produce more reliable code from the
same quality of programmer. Probably from all programmers.

[…]

I see no contradiction between Chris H’s statement and yours. He said
that C *has* taken over from Ada, not that it *should*.

Correct.

I think C can be used safely in safety critical projects. If the process
control and the Sw engineers are professional and disciplined in their
approach.

However I am not sure that C++ is yet in a position to replace Ada for
several reasons… (have you seen how they teach C++ compared to Ada?)

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

A(Answer):

Keith Thompson wrote:

CBFalconer <cb********@yahoo.comwrites:

>Chris H wrote:

>>>

… snip …

>>>
C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation. C and C++
do not have the built-in resistance to programming errors that Ada
does. Thus Ada will always produce more reliable code from the
same quality of programmer. Probably from all programmers.

[…]

I see no contradiction between Chris H’s statement and yours. He
said that C *has* taken over from Ada, not that it *should*.

Excellent point.


[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **

A(Answer):

Flash Gordon wrote:

CBFalconer wrote, On 11/05/08 03:45:

…. snip …

>

>Assuming such reviews and analysis are possible.

If it is not possible then your company will not get the contract
to do safety related work, since the reviews and analysis are
contractual requirements!

>Generally Iworked practically in isolation most of the time,
so that hardware review (i.e. the compilers) was very helpful.

I don’t deny that they are helpful, but reviews can be even more
helpful. Even on non-safety critical work I’ve had an assembler
module rejected because it was not commented well enough for the
reviewer to follow (I ended up needing a couple of comments per
assembler instruction!).

>>OK, I only worked on one safety critical project, but when I
did I made damn sure I new the rules since one of them was
that I could personally be sued if I did not follow them and
someone was killed as a result!

I didn’t have that pressure 30 years ago, but the internal
urge was quite sufficient.

If you were not insisting that third parties review your code,
whatever language it was written in, then your internal urge did
not bring you close to the level I would expect for safety related,
let alone safety critical work.

Ah – but 35 years ago the situation was much different. I operated
on testing machinery in the labs for a 1000 bed teaching hospital,
together with mechanisms for reporting results to the floors. When
I was done we could receive a sample and have the results printed
in the wards within 30 minutes. Aside: Epsom printers saved that
last feature, since we could get reliable printers at a reasonable
price.

I reported to the head of the department, who was also the Dean of
the appropriate university section. He and I pretty well decided
what was to be done, combined with lots of input from others.
There were other software people dealing with our mainframe, but I
originated the practice of building and programming embedded
systems, rather than individual bits of hardware.

Later I got an assistant, from the mainframe area. He was sharp
and teachable, and we could kick some things back and forth.
However, he drank himself to death, literally. In general my
assistants were technicians, dedicated to the actual machinery,
construction, repair, etc.

I think we did a lot, on virtually no money.


[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

** Posted from http://www.teranews.com **

A(Answer):

CBFalconer wrote, On 11/05/08 11:33:

Flash Gordon wrote:

>CBFalconer wrote, On 11/05/08 03:45:

… snip …

>>Assuming such reviews and analysis are possible.

If it is not possible then your company will not get the contract
to do safety related work, since the reviews and analysis are
contractual requirements!

<snip>

>>>OK, I only worked on one safety critical project, but when I
did I made damn sure I new the rules since one of them was
that I could personally be sued if I did not follow them and
someone was killed as a result!
I didn’t have that pressure 30 years ago, but the internal
urge was quite sufficient.

If you were not insisting that third parties review your code,
whatever language it was written in, then your internal urge did
not bring you close to the level I would expect for safety related,
let alone safety critical work.

Ah – but 35 years ago the situation was much different. I operated

Which means your experience is simply not relevant to the way things are
today.

on testing machinery in the labs for a 1000 bed teaching hospital,
together with mechanisms for reporting results to the floors. When

<snip>

I reported to the head of the department, who was also the Dean of
the appropriate university section. He and I pretty well decided
what was to be done, combined with lots of input from others.

OK, at this point, before you write a single line of code, you have
already broken the rules. For safety critical work you would certainly
need another three people as a minimum at the requirements review.
Another SW professional, a SW QA representative, and a safety officer.

There were other software people dealing with our mainframe, but I
originated the practice of building and programming embedded
systems, rather than individual bits of hardware.

So? Your experience still has little bearing on the way things are
currently done and therefore on whether errors would be detected or not.

Later I got an assistant, from the mainframe area. He was sharp
and teachable, and we could kick some things back and forth.

That is still so far away from practices when I left the embedded world
only 8 years ago as to be completely irrelevant to the way things are now.

However, he drank himself to death, literally. In general my
assistants were technicians, dedicated to the actual machinery,
construction, repair, etc.

Useful people to have input from and even to have at some reviews, but a
*long* way from what would be considered a bare minimum these days.

I think we did a lot, on virtually no money.

You may well have done, and using a "safer" language may well have
helped, but these days if you reported that as your development process
on a safety critical project you would not be allowed to go live with
your SW until it had as a minimum undergone a complete review from the
requirements down to code and testing with the code also undergoing
professional static analysis, and from your description I don’t think
even your requirements would pass (no risk analysis for a start).

Flash Gordon

A(Answer):

Flash Gordon wrote:

>

…. snip …

>
You may well have done, and using a "safer" language may well have
helped, but these days if you reported that as your development process
on a safety critical project you would not be allowed to go live with
your SW until it had as a minimum undergone a complete review from the
requirements down to code and testing with the code also undergoing
professional static analysis, and from your description I don’t think
even your requirements would pass (no risk analysis for a start).

You are probably entirely right as far as general production is
concerned. However I still maintain that I produced systems that
were superior, both electrically (hardware) and in software than
what is generally produced today.


[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **

A(Answer):

On Mon, 12 May 2008 20:49:47 -0400, CBFalconer
<cb********@yahoo.comwrote:

>Flash Gordon wrote:

>>

… snip …

>>
You may well have done, and using a "safer" language may well have
helped, but these days if you reported that as your development process
on a safety critical project you would not be allowed to go live with
your SW until it had as a minimum undergone a complete review from the
requirements down to code and testing with the code also undergoing
professional static analysis, and from your description I don’t think
even your requirements would pass (no risk analysis for a start).

You are probably entirely right as far as general production is
concerned. However I still maintain that I produced systems that
were superior, both electrically (hardware) and in software than
what is generally produced today.

95% of all drivers know themselves to be better than average
drivers. Equally well, 95% of all programmers know themselves to
be superior programmmers.

Richard Harter, cr*@tiac.net
http://home.tiac.net/~cri, http://www.varinoma.com
Save the Earth now!!
It’s the only planet with chocolate.

A(Answer):

Richard Harter wrote:

CBFalconer <cb********@yahoo.comwrote:

>Flash Gordon wrote:

>>>

… snip …

>>>
You may well have done, and using a "safer" language may well have
helped, but these days if you reported that as your development process
on a safety critical project you would not be allowed to go live with
your SW until it had as a minimum undergone a complete review from the
requirements down to code and testing with the code also undergoing
professional static analysis, and from your description I don’t think
even your requirements would pass (no risk analysis for a start).

You are probably entirely right as far as general production is
concerned. However I still maintain that I produced systems that
were superior, both electrically (hardware) and in software than
what is generally produced today.

95% of all drivers know themselves to be better than average
drivers. Equally well, 95% of all programmers know themselves to
be superior programmmers.

True. However, what portion of that 95% are right? 🙂


[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
** Posted from http://www.teranews.com **

A(Answer):

On May 11, 3:35 am, Chris H <ch…@phaedsys.orgwrote:

In message <87abixp9k5….@kvetch.smov.org>, Keith Thompson
<ks…@mib.orgwrites

CBFalconer <cbfalco…@yahoo.comwrites:

Chris H wrote:

… snip …

>C and C++ are the dominant languages for embedded work too. C has
taken over from Ada on a lot of safety critical systems. C++ is
being used on some high reliability systems (and the JSF)

This is a horrible misstatement of the actual situation. C and C++
do not have the built-in resistance to programming errors that Ada
does. Thus Ada will always produce more reliable code from the
same quality of programmer. Probably from all programmers.

[…]

I see no contradiction between Chris H’s statement and yours. He said
that C *has* taken over from Ada, not that it *should*.

Correct.

I think C can be used safely in safety critical projects. If the process
control and the Sw engineers are professional and disciplined in their
approach.

You mean if humans take over the job of tools. Yes, I have in fact
seen some Chinese students that are extremely fast on an abacus —
they can rival calculators in speed and accuracy. Of course its a
total waste of neurons, but it is *possible*.

However I am not sure that C++ is yet in a position to replace Ada for
several reasons… (have you seen how they teach C++ compared to Ada?)

There are major, obvious glaring holes in safety in C. There are ways
of addressing these, but nobody seems to care. Certainly the standard
committee doesn’t care. If we had a standard way of managing the
weaknesses of C that made it functionally comparable to Ada (which is
possible, through enhancements, additions and modifications to the
standard library) then it would a fair language to use for critical
systems.


Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/

LEAVE A COMMENT