Le 03/08/12 23:31, Rui Maciel a écrit :
Again, where do you base your assertion that C++ is in decline since 2003?
Do you actually base your assertion on any tangible evidence or did you made
that up?
I would not say that c++ is in "the decline" but there are some
developments that are noteworthy.
1) After several YEARS of work, the creator of the language declares
that he is unable to add a new feature to the language.
This means that C++ has become such a complex software construct that
it is impossible for its creator (Mr Bjarne Stroustrup) to fully
understand the consequences of a language enhancement. This shows
us the level of complexity reached by C++.
2) Undeterred by this fact, the new standard piles up yet another thick
software layer into the already brittle edifice. Lambdas, and other
esoteric constructs add more complexity as if increasing the
number of language constructs and their unforeseen interactions
was a good thing!
3) It is more or less impossible to parse C++ without the help
of a machine. For instance the specifications of the operator
overloading part goes into pages and pages of complex specifications
(if I remember correctly there were more than 5 full pages) and at the
end you had to do a topological sort of the classes defined at the
point of call to be able to see which overloaded operator would spring
into action at a given point.
Obviously the consequence is that instead of trying to understand by
reading, you have to follow the debugger and bring the program to the
point of the overloaded call to be sure it goes to where you think it
is going.
And you can be sure that somebody else, unaware of all this adds an
overloaded call, introducing a bug in a completely unrelated part of the
program.
Can you do that test for all overloaded calls you write?
Do you have the time?
Can you repeat that test each time somebody introduces a new overloaded
version of that function within your scope?
No. Then you just write it and suppose it is OK. And in most cases it
is. But then... well then you call the maintenance people that are used
to that kind of nightmares. At last, they are paid for doing that isn't
it?
4) All C++ programmers (besides Bjarne) use a portion of the huge
language since it is not possible to fit every detail of that into a
human brain.
This means that only the overlapping portions of the language can be
understood by all of them, and a proliferation of "C++ subsets" starts
that makes communication between programmers more difficult.
In all my life as a programmer I have tried to keep things SIMPLE.
That is why I like (and use) the C language. C is a language that
can be understood in full by a person.
Yes, I know. You will tell me that the complexity is in the language
instead of in every program that uses the language and that a complex
language simplifies programs. Yes, I do KNOW that.
But there is a point of diminishing returns where you add complexity to
the language trying to be all things to everyone and you end up with
being a complexity monster for everyone.
I know that you like C++ Rui, and I hope you do not feel personally
attacked since I am talking about a computer (machine) language.
We tend to get attached to languages because of other philosophical
reasons. For instance the fact that I like small and simple computer
languages comes from my beliefs that "small is beautiful" from my youth,
and many other things that are more or less completely irrelevant here.
Let's try to put all that baggage aside and discuss in a rational
manner.
jacob