Re: is LISP the ultimate prgram language?
On Oct 22, 3:50 pm, "osmium" <r124c4u...@comcast.net> wrote:
"James Kanze" wrote:
<WRT Linux quality>
I definitely think it's easier to develop quality code in C++
than in C, perhaps by an order of magnitude or more.
I think that statement epitomizes a huge problem I have had
with C++, and always will have. As I learned I kept looking
for this wonderful magic bullet in C++, kind of like
structured programming.
And that is your problem. There is no magic bullet. There are
a number of important paradigms which improve productivity, each
important, and the strength of C++ is that all of them are
possible in it. Any one may be better implemented in another
language, but the real productivity gain is in using whichever
one is appropriate in a given situation.
Once one really learns about structured programming there is
an enormous increase in productivity, perhaps as much as an
order of magnitude. As I worked myself through the process of
learning C++, I would say to myself, yes, this is nice, that
is nice, but where is the *really* good part? After many
years I have concluded that there is no really good part. It
is just a complicated agglomeration of pretty good ideas,
fitted together in one language. Someone mentioned, upthread,
a Swiss army knife, and I think it is an excellent metaphor.
My problem is that I detest Swiss army knives and Crescent
wrenches!
Perhaps. The screwdriver in a Swiss army knife probably isn't
as good as a purpose built screwdriver, but if you need to drive
a screw, it's a lot better than a hammer.
Change order of magnitude to 40% better and I am on board as a
C++ guy.
You can't make a nice cohesive, consistent, language (such as
Algol 60 or Pascal) with such diverse roots, one root is C,
cryptic beyond belief with '%' meaning modulo, and the huge,
15 character or so guru selected names of things used in the
STL.
That's certainly a problem, and a more Pascal like syntax (with
a lot less special characters) would certainly improve things.
But the number of special characters, or the use of {} instead
of begin/end is, in the end, a detail. The real diffence comes
with encapsulation (and access control), the ability to use
polymorphism when appropriate (and the fact that you're not
stuck with it when it isn't), the ability to use programming by
contract idioms (with private virtual functions), the ability to
define abstract types (like std::vector), the ability to
separate interface (in the header file) and implemenation (in
the source). None of these are unique to C++, and for any one,
you could probably find a better language, but having all of the
possibilities at hand makes C++ a powerful tool. Not perfect,
but it works, and the alternatives all seem to have some fatal
weakness.
--
James Kanze