(e-mail address removed) wrote:
[...]
One place C++ falls down badly is for run-time
metaprogramming. I have yet to find a good solution for this.
Java seems to offer the most popular compromise between static
typing and run-time introspection ("reflection"), if not
outright metaprogramming. Lisp and Smalltalk both seem to
have better support, but lack popularity in industry, possibly
because they lack static typing.
Exactly. It's a question of reliability: the more errors that
can be caught by the compiler, the less escape into the actual
program. I work mainly on systems where high reliability is
important. For those, even Java is too "dynamic", and C++ (or
Ada 95) seem to be about right. Note that the size of the
application is an issue as well. The more people collaborating
on the coding, the more static checking becomes important as
well.
In the past, I've had success mixing Perl and C++, though I'm
rapidly replacing Perl with Ruby.
I'm afraid I show my age. For small things (and connecting
software), I use Bourne shell, with AWK and sed.
Another shortcoming of C++ is that the code is extremely
verbose,
I've not noticed this. Verbose compared to what?
unless you've got a special-purpose library
specifically designed to make the task at hand convenient.
Well-written C++ applications often comprise a bunch of DSELs,
stitched together by lowest-common-denominator syntax. The
seams should be pretty minimal. Developing this kind of thing
takes a lot of time, so C++ is not necessarily the quickest
language in which to get something flexible up and running.
That's part of the trade off. Flexibility vs. reliability. C++
is one of the quickest languages to get something large up and
running reliably. With an accent on the "large" and the
"reliably": for fairly small projects, there are likely better
languages, and if you need flexibility more than reliability,
Smalltalk or some of the Lisp dialects (Scheme?) probably beat
it even today.