Re: C++... is it dying?
On Jul 21, 1:46 pm, "Daniel T." <danie...@earthlink.net> wrote:
James Kanze <james.ka...@gmail.com> wrote:
"Daniel T." <danie...@earthlink.net> wrote:
Juha Nieminen <nos...@thanks.invalid> wrote:
puzzlecracker wrote:
If I had to code in C, which has no data containers nor
algorithms whatsoever (besides the horrible qsort), that
would be a real nightmare.
Nonsense. You would do the same thing every programming house
did before the STL came along, develop your own set of
containers and algorithms and use them. Then when someone
asked why you don't switch from what you know to this "new
improved" library, you would look at all the code you already
have written, all the evidence that your containers work and
work well, and ask "why bother?"
To which you answer: because it's standard. I've used many
different pre-standard libraries, most of them better designed
than the STL (but some real desasters in design, too). But none
of them as well known as the STL: I'm concerned with my code
being easily understood not only by the veterans who've worked
at the company for years, but by the new kids we hire next week.
For most purposes, the my GB_ArrayOf, OSE's OTC_Vector and the
standard's std::vector will work equally well, but the new hire
will already know std::vector, but not GB_ArrayOf or OTC_Vector.
(Not to mention that a lot of places where I've worked bought in
libraries like the Booch toolkit, which are no longer
supported.)
The new kids we hired (about 20 in the last 3 months) don't
know the STL, so your reasoning is quite speacious.
I know. It's a problem. I once had a candidate who didn't know
the meaning of virtual. There are a lot of Basic or C
programmers out there who claim C++, because it is what the
market is asking for.
That's why you vet candidates, and don't take their CV too
literally until you've actually talked to them.
Most people learning C++ still learn "from the ground up",
they have barely touched on the standard containers and
algorithms (if at all,) and routinely use raw pointers and
loops, because that was what they learned in school.
What school? There are some professors who are out of date, but
on the whole, the situation is no where near as bad as you seem
to indicate.
I've seen a lot more of the opposite: the people coming out of
school are all eager to show what they've learned, and throw in
template metaprogramming and who knows what all else, when all
that is needed is a simple for loop.
Programming languages have a nasty habit of starting life
clean and well designed but with a few quirks and lacking in
some way, then they grow to become bloated beasts that have
way more than they need and even more quirks because of the
requirement that they are backwards compatible. Eventually
they die under their own weight. Either that, or the language
stagnates and eventually becomes minor niche.
C++ seems to be in the unenviable position of officially
bloating while practically stagnating.
I don't follow you here.
I'll spell it out, C++ (indeed any language that has been
growing for a while) has a bunch of "standard features" that
people don't use, and more is being added, while it also has a
bunch of "warts" that people have to use.
As you say, that's a penalty which comes with being mature. C++
certainly can't be accused of being overly simple or to
abstractly elegant. In the case of C++, in addition, the
language tries (and largely succeeds) in being usable for
everything. But it's clear that the features you need to
implement an OS kernel or a low level library (like the standard
library) aren't generally of much use in application code. And
vice versa.
Please understand, I love the language and know it well, but I
find that isn't the case for most users of it.
The problem I sometimes find is that while the older users and
the youngers both know the language well, and love it, it's not
always the same language they know and love. (The other problem
I find is that most practitionners seem to go to extremes. It's
either STL and TMP everywhere, or no where. You need balance:
my job as an applications programmer isn't to stress test the
compilers, but you also do have to evolve.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34