Bjarne Stroustrup Reveals All On C++
An anonymous reader writes "Bjarne Stroustrup, the creative force behind one of the most widely used and successful programming languages — C++ — is featured in an in-depth 8-page interview where he reveals everything programmers and software engineers should know about C++; its history, what it was intended to do, where it is at now, and of course what all good code-writers should think about when using the language he created."
C++ is a woman?! I didn't see this coming.
(C'mon KDE guys, it's funny. Laugh.)
My blog
My blog
in an 8 page interview? I feel like a sucker for buying the 900 page book
More music, fewer hits
programs in C++ could be simultaneously elegant ... and efficient for systems programming... Obviously, not every program can be both and many are neither
Many are neither. Ain't that the truth.
Best Slashdot Co
Avoid it like the plague!
Some of you might remember the article at:
Facial Hair:Coding Success
Has Bjarne grown a beard or something? That's the only way I can explain that he's on the front page of slashdot today.
FTA they tried calling it C with Classes, but that didn't stick, so they asked for suggestions and got C++
I think they should have called it Class-C. Much more fun to pronounce.
On the 1st of January, 1998, Bjarne Stroustrup gave an interview to the IEEE's Computer magazine.
Naturally, the editors thought he would be giving a retrospective view of seven years of object-oriented design, using the language he created.
By the end of the interview, the interviewer got more than he had bargained for and, subsequently, the editor decided to suppress its contents, for the good of the industry, but, as with many of these things, there was a leak.
Here is a complete transcript of what was was said,unedited, and unrehearsed, so it isn't as neat as planned interviews.
You will find it interesting...
Interviewer: Well, it's been a few years since you changed the world of software design, how does it feel, looking back?
Stroustrup: Actually, I was thinking about those days, just before you arrived. Do you remember? Everyone was writing 'C' and, the trouble was, they were pretty damn good at it. Universities got pretty good at teaching it, too. They were turning out competent - I stress the word 'competent' - graduates at a phenomenal rate. That's what caused the problem.
Interviewer: problem?
Stroustrup: Yes, problem. Remember when everyone wrote Cobol?
Interviewer: Of course, I did too
Stroustrup: Well, in the beginning, these guys were like demi-gods. Their salaries were high, and they were treated like royalty.
Interviewer: Those were the days, eh?
Stroustrup: Right. So what happened? IBM got sick of it, and invested millions in training programmers, till they were a dime a dozen.
Interviewer: That's why I got out. Salaries dropped within a year, to the point where being a journalist actually paid better.
Stroustrup: Exactly. Well, the same happened with 'C' programmers.
Interviewer: I see, but what's the point?
Stroustrup: Well, one day, when I was sitting in my office, I thought of this little scheme, which would redress the balance a little. I thought 'I wonder what would happen, if there were a language so complicated, so difficult to learn, that nobody would ever be able to swamp the market with programmers? Actually, I got some of the ideas from X10, you know, X windows. That was such a bitch of a graphics system, that it only just ran on those Sun 3/60 things. They had all the ingredients for what I wanted. A really ridiculously complex syntax, obscure functions, and pseudo-OO structure. Even now, nobody writes raw X-windows code. Motif is the only way to go if you want to retain your sanity.
[NJW Comment: That explains everything. Most of my thesis work was in raw X-windows. :)]
Interviewer: You're kidding...?
Stroustrup: Not a bit of it. In fact, there was another problem. Unix was written in 'C', which meant that any 'C' programmer could very easily become a systems programmer. Remember what a mainframe systems programmer used to earn?
Interviewer: You bet I do, that's what I used to do.
Stroustrup: OK, so this new language had to divorce itself from Unix, by hiding all the system calls that bound the two together so nicely. This would enable guys who only knew about DOS to earn a decent living too.
Interviewer: I don't believe you said that...
Stroustrup: Well, it's been long enough, now, and I believe most people have figured out for themselves that C++ is a waste of time but, I must say, it's taken them a lot longer than I thought it would.
Interviewer: So how exactly did you do it?
Stroustrup: It was only supposed to be a joke, I never thought people would take the book seriously. Anyone with half a brain can see that object-oriented programming is counter-intuitive, illogical and inefficient.
Interviewer: What?
Stroustrup: And as for 're-useable code' - when did you ever hear of a company re-using its code?
Interviewer: Well, never, actually, but...
Stroustrup: There you are then. Mind you, a few tried, in the early days. There was this Oregon company - Mentor Graphics, I think they were called - re
Inaccurate. You forgot COBOL. But that's understandable, I want to forget it, too.
Where is the printf() version?
Bjarne Stroustrup Reveals All On C++
You mean... He's been holding back?
If you do what you always did, you get what you always got.
Why don't you ride the bus? You wouldn't need to even think about steering at all!
Do you even lift?
These aren't the 'roids you're looking for.
Be careful - you should Turn Left. Turning right may make you dissolve into little fat monsters.
"I'm an old-fashioned type of guy. I worship the Sun and Moon as gods. And fear them."
How is it Stoustrup's fault if people use the C features instead of the C++ ones? Your claim that Stroustrup is the "cause of most of the buffer overflows, system crashes, and security holes in the world." is absurd.
You made this statement: "If array sizes were carried along with arrays, we'd have far less trouble". Array sizes ARE carried along with arrays. See the following code:
#include
#include
int main(int argc, char **argv)
{
const char str[] = "hello world";
const char *str1 = "hello world";
printf("array len: %d\n", sizeof(str));
printf("ptr len: %d\n", sizeof(str1));
return(0);
}
This code produces the following output:
array len: 12
ptr len: 4
Arrays and pointers to character strings are not the same thing, though they are related and, in many circumstances, can be used interchangeably.
It seems that you should learn more about C before you start criticizing C++. As others have stated, it's usually the mediocre programmers who complain about C++.
don't you mean (the) cout version;
> When I'm driving my car and I turn the steering wheel right, I expect the car to run right,
Stay out of boats then.
Hey! I'm illiterate, you insensitive clod!
As are most c++ programmers.
Great minds think alike; fools seldom differ.
... +Inf, -Inf...
Everything has its limits, you know.
If you do what you always did, you get what you always got.
You mean the cout version, noob!
His answer was along the lines of: "Oh, I never use a debugger. If something's not working right I just think about it...maybe I'll add a printf once in a while if I need to check something."
Now you know why utterly un-debuggable features like templates went into the language...
the bloke was complaining about function nesting and you suggested Lisp?
Oh know were not.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Umm, QED?