C++... is it dying?

J

James Kanze

James Kanze <[email protected]> wrote:

[...]
Someone "vaguely familiar with the STL" is going to fair no
worse with our container libraries (and I wouldn't expect such
a person to have much knowledge of the algorithms at all)...
So that isn't a good enough reason to invest in the switch.

Someone "vaguely familiar with the STL" will still know that to
declare an array of double, you write std::vector< double >.
And that to build it up, you use push_back(). That a standard
idiom is to declare it empty, and build it up (which isn't the
case with most of the other libraries I've seen). He will know
that you need two iterators to do anything, and that different
types of containers, iterators and algorithms exist; if he's any
good at all, he will know to check the list of algorithms to see
if one exists that will do what he needs (which doesn't always
help as much as you'd like, because the names aren't always
clear enough, and one of the most useful algorithms, accumulate,
isn't in the algorith section at all.

He won't know about allocators, of course, nor will he have
memorized all of the algorithms. And he'll his knowledge of
what invalidates an iterator will be limited to the vague notion
that as long as you only call const functions, you're safe. But
he still knows enough to be able to use them for everyday
purposes from the day one.
I'd hate to knock any particular school despite the fact
almost all of our new hires came from the same one... They
tend to wonder why they should bother with making member's
private, they don't seem to understand why its good to break
that two page function into smaller conceptual blocks, they
think a class with 30 member-variables is acceptable...

:).

There are several issues, and I find schools (and even
professors in the same school) vary. I know that some schools
take their C++ seriously. And of course, many of the issues you
raise are more basic, software design issues. (Given the
choice, I'd hire someone who only knows Java, but is good at
software engineering, over someone who knows all the details of
C++, but writes two page functions and classes with 30 member
variables.) Regretfully, such issues do seem to get short
shrift in a lot of schools. And even less attention seems to be
given to the most fundamental software engineerig issues: things
like making a cost efficient choice among the available
solutions. (Whence the problem I cited: those that do know the
STL and TMP tend to overuse and abuse it, because it is cool.
But it's nothing new: today, I constantly see template classes
that are instantiated just once, for a single type; in earlier
days, it was abstract base classes with just a single derived
class. I've come to believe that premature genericity is a lot
like premature optimization.)
 
I

Ian Collins

Daniel said:
Ah, so C++ *is* dying, despite the fact that the number of people who
claim to know it is high.

The language isn't, but the school your grads come from probably should be.
 
M

Matthias Buelow

James said:
over someone who knows all the details of
C++, but writes two page functions and classes with 30 member
variables.)

Nothing wrong with that in principle; better than those "I have to put
everything in a new class" types, imho. Which is just bureaucratic
clutter most of the time.
 
P

puzzlecracker

You know guys, I currently work with a huge platform that has been
under development for over a decade. It's written in C and C++,
predominately latter, though we export API in other languages that can
connect to our system (though they implemented on top of C++) I have
never seen a bigger coding mess in my life: lots of old
implementation entirely in .h files, an overly deep branching that
used to make gcc run out of memory on solaris boxes, unreadable and
uncommented code, a vast number of classes and some classes exceeding
10K lines of code per file. I am coming from Java/Net stuff, and this
appalling. I have used C++ as a hobby and in school -- however I have
never dealt with systems of this size and caliber. And, you know, I am
scared.... I really hope there are C++ systems out there developed
cleanly and legibly.

Don't get me wrong, our products valued highly on the market, and
customer base is immense...
 
Y

Yuhan Fang

scared.... I really hope there are C++ systems out there developed
cleanly and legibly.

I work mainly with numeric code produced by engineers, which often
comprises spaghetti-classes where graduate students have come, tinkered
within their own namespace, and gone, leaving behind working but
incredibly illegible code. It doesn't help that most of the code was
written before any modern C++ constructs were introduced (templates,
STL, and so forth) or that it is mostly a literal translation of C
translated literally from FORTRAN. On the other hand, the code consists
entirely of a large number of operations on arrays of floats, so there
really isn't too much use for advanced C++ features.

I think systems programming often demands and implements much
cleaner design patterns, if you need some inspiration. (Or this could
just be wistful thinking!)
 
C

coal

It's a management and leadership problem, not a technological one.

It's very very common.

OT: I think it has to do with intelligence not being a requirement for advance
to leadership position (to wit: George Bush, IQ of 120 or something, lower than
even me), but simply either a strong killer instinct or a conformity instinct. I
think this happens for the same reason that e.g. nations go to war, or that
we're peppered with nonsensical ads, or that people, over 50% in Western
countries, are or claim to be religious in spite of that being insane. Namely,
that human beings are social creatures evolved to react in a social context to
very simple stimuli (I find the human reaction to rhythm and music, and its
connection to trance, hypnosis and group/mob behavior, especially interesting,
because it can be involuntary, completely forced: it seems that most people have
absolutely no intelligence or free will relative to the basic instincts).

"Where is the wise man? Where is the scholar? Where is the philosopher
of this
age? Has not G-d made foolish the wisdom of the world? For since in
the
wisdom of G-d the world through its wisdom did not know him, G-d was
pleased
through the foolishness of what was preached to save those who
believe. Jews
demand miraculous signs and Greeks look for wisdom, but we preach
Christ
crucified: a stumbling block to Jews and foolishness to Gentiles, but
to those
whom G-d has called, both Jews and Greeks, Christ the power of G-d and
the
wisdom of G-d. For the foolishness of G-d is wiser than man's wisdom,
and the
weakness of G-d is stronger than man's strength." First Corinthians
1:20-25

Paul knew many considered his message to be foolishness, but imo
Paul's
scholarship and understanding was excellent. I believe people can
forfeit
free will by choosing poorly over the course of their lives. I'm
happy to
remind people of Kepler's describing his planetary theories as
"thinking
G-d's thoughts after him." Imo we are indebted to people like Kepler.

Anyway, I'm glad to say I agree with you on the topic of top posting
and
am glad you keep advising against it.


Brian Wood
http://webEbenezer.net
 
T

tony_in_da_uk

You know guys, I currently work with a huge platform that has been
under development for over a decade. It's written in C and C++,
predominately latter, though we export API in other languages that can
connect to our system (though they implemented on top of C++) I have
never seen a bigger coding mess in my life: lots of old
implementation entirely in .h files, an overly deep branching that
used to make gcc run out of memory on solaris boxes, unreadable and
uncommented code, a vast number of classes and some classes exceeding
10K lines of code per file. I am coming from Java/Net stuff, and this
appalling. I have used C++ as a hobby and in school -- however I have
never dealt with systems of this size and caliber. And, you know, I am
scared.... I really hope there are C++ systems out there developed
cleanly and legibly.

Don't get me wrong, our products valued highly on the market, and
customer base is immense...

Alf's on the money as usual. Very, very common. But it's wrong to
blame C++ for this, except in-as-much as that if the system had been
written in some other language it would probably have ceased to be a
commercial concern a long time ago. In any system of that duration
and scale, it takes strong leadership to keep things on track, insist
that certain standards of testing and encapsulation are observed, and
force people to refactor occassionally rather than always making the
easiest short-term hack. My job-before-last was with a massive
financial data provider, and much of the code was an abomination (in
FORTRAN to boot), with only the core percent or two even robust, but
similarly the sheer volume of functionality was insurance against any
new company usurping the market dominance. Commercially, better to
carry the baggage than put out the garbage. Such is life, and if it
pays your bills... *shrug*. Have to focus on quality where it
actually counts, abstract legacy mess under clean interfaces that help
to ensure supported usage, and know when to make a clean start on some
small and naturally self-contained project.

Tony
 
M

Michael DOUBEZ

(e-mail address removed) a écrit :
"Where is the wise man? Where is the scholar? Where is the philosopher
of this age?

At home, as usual, at this time of the day.
[snip]
Anyway, I'm glad to say I agree with you on the topic of top posting
and am glad you keep advising against it.

I would ever be so grateful if you add OT posting on your agreement list.
 
M

Mirco Wahab

James said:
On vacation, more likely, at this time of the year:).

"Wise men" are obsolete at this part of our era.
They are of no use. They'd be 'un-real'. So if
there were any, they're from a former age and
most probably dead ...

(Afaik there was even one who formulated the
obsoleteness of all these things and himself,
http://en.wikipedia.org/wiki/Günther_Anders )

Oops, this got off-topic now ...

Regards

M.
 
M

Michael DOUBEZ

Mirco Wahab a écrit :
"Wise men" are obsolete at this part of our era.

Well, then ... they most likely went to acapulco. Sun and bikinis make a
good retirement location.
They are of no use. They'd be 'un-real'. So if
there were any, they're from a former age and
most probably dead ...

(Afaik there was even one who formulated the
obsoleteness of all these things and himself,
http://en.wikipedia.org/wiki/Günther_Anders )

After going through WW2, no wonder he would think so (I am not trying to
get a Godwill point). I see he was married to Hannah Arendt; IMHO her
work is a better reading.
Oops, this got off-topic now ...

Not sure. We could wonder if C++ gurus also go to acapulco and how that
will influence the language. Are they on vacation or sweating on the
next much expected standard ?

IMO a guru at acapulco sweating on the next C++ standard is a clear
indication that C++ is not dying.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,801
Messages
2,569,658
Members
45,421
Latest member
DoreenCorn

Latest Threads

Top