[plug] [why not staroffice]

Christian christian at amnet.net.au
Fri Oct 6 10:02:53 WST 2000


On Fri, Oct 06, 2000 at 01:06:12AM +0800, Mike Holland wrote:
 
> Dont be so defensive - C++ is great, its just some of the programmers that
> aint so good. C++ gives you plenty of rope, but it has huge benefits over C.
>  eg C programs have a horrible habit of leaking memory. In C++, all
> dynamic memory is pointed to by class members, which are freed by the
> class destructor. IF you do it properly. Ditto for resource release in
> general.

Remembering to free memory in C is not that different to remembering to
free it in C++.  Plus, in C++, you will have hidden from you the actual
things that the language is doing.  In C, it's right there in front of
you.  Personally I think that remembering to look after your memory is a
big/important task regardless of whether it's C or C++ that's involved.
And at least C makes it easy for you to find the problems.

(Don't get me wrong, I see your point about destructors freeing memory
automatically, it's just that that requires good programming which, if
applied to C, yields the same results; memory getting freed where
appropriate.)

>   C++ is much more typesafe. Operator overloading is way cool,
> especially if you want something like complex numbers, or extra precision.
> OK, multiple inheritance can get a bit messy. So dont use it.

I've heard numerous people suggest that C++ is more typesafe than C only
to have others completely refute it.  In the end I'm inclined to think
that the typesafe nature of C++ is mostly illusory and at least C makes
you *think* about what you're doing which would seem to be the best way
to find errors.



More information about the plug mailing list