Re: C++ more efficient than C?



Ben Bacarisse <ben.usenet@xxxxxxxxx> writes:

"Chris Thomasson" <cristom@xxxxxxxxxxx> writes:

"Richard" <devr_@xxxxxxxxx> wrote in message
news:ftk8de$l7r$3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
<snip>
Yet there are millions of systems out there leaking memory.

Only because the programmer screwed up. This is not C's fault at all.

It may even be partly due to the success of C++ in a roundabout way.
Lots of institutions teach C++ rather than C, but there are many
managers who think that anyone who knows C++ knows C, so I would not
be surprised to find more people being to asked tinker with C who have
a C++ mindset than there are people tinkering with C++ who have a C
mindset.

Rather than grow another subthread, I'll tack another comment on here.
There is often talk about one or other language feature being more or
less "error prone". I have my own opinions, but who cares about them?
This is not a technical question about languages, but a question for
psychologists and maybe even sociologists.

It would be possible to study, scientifically, how and why programmers
make errors and we could, then, design languages than build on this
understanding but this is very rarely done. (I think I've seen one
report about it.[1]) Without such study, all we really have is a bunch
of anecdotes about the errors we've seen and canned assumptions like
how easy it is to confuse = with ==.

I've set followup-to: comp.programming. Please consider honouring
that if you reply. I've not criticized or corrected anyone, so there
is no reason not to!

[1] I you know of good work in this area, please post a link.

Perhaps starting from http://www.ppig.org/
google: "psychology of programming"


--
__Pascal Bourguignon__
.


Quantcast