C++ programming

Garriss, Michael Michael.Garriss at abacus-direct.com
Wed Oct 16 10:13:22 EDT 2002


The power that C++ gives you can be and is often abused.  It is possible
(easy even) to write totally unreadable and un-extendable code.  It is also
possible to write code that is so totally wrong that no expert could hope to
fix it.  If you'd like to avoid these pitfalls there are a few "dumb-ed
down" languages (like Java) that work fine.  C++ is for programmers, not
people who just need programs.  I suspect many of the members of this list
fall into the later category.  For those people I would never suggest C++,
their best option to find a programmer.  In my email that started this
thread I merely suggested "taking the time to learn C++" because that's
exactly what it takes, time.  I misused C++ for about 9 years and have now
finally, in the last year, been using it to it's full potential.  I am
independent contractor/software engineer.  In this line of work you must hit
the ground running and produce code that in immediately effective and
usable.  C++ allows me (not necessarily you) to do this.  I am many times
more efficient because of things like: multiple inheritance (something Java
advocates claim is unnecessary but it far from it), templated types, the STL
and all generic programming libraries, the boost libraries. metaprogramming,
lambda functions, streams, etc.

-Mike Garriss

> The C++ language is often more convenient than C.  In addition,
> I have seen many fields in which Fortran is the commonly used language.
> In my opinion it is necessary to be fluent in both Fortran and C
> in order to collaborate with other on various projects.  With regard
> to C++, it is very easy to write a program that requires the patient
> of a saint to understand if the person reading the code is not the
> author.  (Because the actual function called depends on the types
> of the variables and depends on the actual class created when a
> pointer to a class is the base class of a hierarchy with virtual
> functions.)  The reusability and flexibility of classes of C++
> actually makes changes more difficult when the the change is not
> forseen by the original author -- in my opinion, based on my experience.
> For example, I found it very difficult to parallelize a program
> written in C++ because the original author (who left the company)
> wrote very generalized classes whereas I needed to distinguish
> whether data was on the same machine (accessable by pointer) or on
> a different machine, which required message passed to access the data.
> The distinction was not forseen and hence it was necessary to understnad
> every part of the code, which used a large amount of function overloading.
>    It is interesting how the discipline of writing programs that can
> be changed easily in the future is far beyond the discipline of
> understanding the programming language.
> best regards,
> Alan Scheinine
_______________________________________________
Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf



More information about the Beowulf mailing list