Group: comp.lang.c++
From: "Chris Thomasson"
Date: Thursday, April 10, 2008 5:39 PM
Subject: Re: C++ more efficient than C?

"Pascal J. Bourguignon" wrote in message
news:7cabk26n8k.fsf@pbourguignon.anevia.com...
> "Chris Thomasson" writes:
>
>> "Richard" wrote in message
>> news:ftk8de$l7r$3@registered.motzarella.org...
>>> Richard Heathfield writes:
>>>
>>>> Juha Nieminen said:
>>>>
>>>>> Richard Heathfield wrote:
>>>>>>> 1) It forces the user to write unsafe code even if he didn't want to
>>>>>>> (in other words, even if in his case it would be enough to use a
>>>>>>> local,
>>>>>>> stack-allocated object of type 'point').
>>>>>>
>>>>>> I disagree that this is unsafe.
>>>>>
>>>>> You are seriously claiming that allocating objects dynamically with
>>>>> malloc is no more error-prone than using local instances of objects?
>>>>
>>>> I am seriously claiming that allocating objects dynamically with
>>>> malloc and
>>>> managing them properly is a skill that is not difficult to master.
>>>>
>>>
>>> Yet there are millions of systems out there leaking memory.
>>
>> Only because the programmer screwed up. This is not C's fault at all.
>
> Chris you are perfectly right.
>
> However, since it is known that the programmers make errors, and that
> C allows these programmers errors to lead to catastrophical
> consequences, there is still someone who is at fault for allowing (or
> more often, to mandate) programmers to use C to develop software.

Ahh, now that's different. Sure you can case some blame on somebody for
choosing the wrong tools for the job. I am not sure how that relates to C.
However, the language can be the right choice in some scenarios.




> I'm
> pointing my finger at the managers who should forbid programmers to
> use languages like C or C++ to develop any MIT software.
>
> Perhaps C or C++ are needed in some very specific case (it's been
> proven that they're not needed to write good operating systems though,
> not even a unix (there was several 'unix' kernel written in different
> programming languages)), but I fail to find one.

If you are expected to program under POSIX, then you should know C. There
are big companies out there that use C/C++ to build important pieces of
software. For instance, the software that runs Google is largely written in
C/C++...

Safety Articles | Usenet Groups | Usenet News | Bluegrass