On Thu, Feb 12, 2009 at 06:07:31PM -0700, Douglas Roberts wrote:
> For some while I've been kind of surprised, in a detached sort of way, at
> the general disregard that the FRIAMers I talk with hold for C++.  One
> explanation that has been given me was "Well, C++ is prone to horrible
> memory management errors."
> 
> To which I respond: not if you code properly.  And when you do make (the
> inetivable) memory allocation/deallocation/reference error, there are tools
> that will help you track the problem down posthaste.  Valgrind, for
> example.  Purify, for another.

+1. 

And one almost never makes these types of errors if you use RAII
properly. The only time I make such errors is when I'm being forced
into a non-RAII framework by some API, and the errors are typically
confined to the RAII layer I erect around that API as a matter of course.

> 
> Another reason that has been repeatedly given for C++'s disfavor is, "It
> takes too long to develop C++ expertise."  I guess I don't buy that either.
> I don't really think the level of expertise necessary to gain proficiency in
> C++ is all that much different that FORTRAN, Java, Pascal, LISP, or any
> other major language.

It is when it comes to object oriented techniques. C++ is a much
richer language than say Java, so it does require more learning to use
it effectively. But once learnt, there is no difference in
productivity, and there is a greater range techniques to express
algorithms, giving greater control to the programmer for efficiency
and the like.

I do use both, but much prefer the expressive power of C++.

Cheers
-- 

----------------------------------------------------------------------------
Prof Russell Standish                  Phone 0425 253119 (mobile)
Mathematics                              
UNSW SYDNEY 2052                         [email protected]
Australia                                http://www.hpcoders.com.au
----------------------------------------------------------------------------

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Reply via email to