Slashdot Mirror


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."

31 of 371 comments (clear)

  1. Oh... my... god... by Anonymous Coward · · Score: 3, Funny

    C++ is a woman?! I didn't see this coming.

    1. Re:Oh... my... god... by Anonymous Coward · · Score: 5, Funny

      It shouldn't be that surprising. The new operator should have given it away. After all, in C++ you can create objects (children) that consume resources and don't clean up their garbage. The secret to how it works is that C is a man.

    2. Re:Oh... my... god... by PPH · · Score: 2, Funny

      Is that you, Verity Stob?

      --
      Have gnu, will travel.
    3. Re:Oh... my... god... by mav[LAG] · · Score: 4, Funny

      C++'s social life is a bit weird as well: I hear that friends have access to your privates.

      --
      --- Hot Shot City is particularly good.
  2. Humour by morgan_greywolf · · Score: 2, Funny

    I needed a tool for designing and implementing a distributed version of the Unix kernel. At the time, 1979, no such tool existed. I needed something that could express the structure of a program, deal directly with hardware, and be sufficiently efficient and sufficiently portable for serious systems programming.
    I take it Bjarne hasn't used KDE.

    (C'mon KDE guys, it's funny. Laugh.)

  3. Re:Interesting Read by morgan_greywolf · · Score: 5, Funny

    RTFA for once, you lazy clods!
    Hey! I'm illiterate, you insensitive clod!
  4. everything programmers should know about C++? by OglinTatas · · Score: 5, Funny

    in an 8 page interview? I feel like a sucker for buying the 900 page book

    1. Re:everything programmers should know about C++? by linal · · Score: 2, Funny

      Just be thankful you didn't buy this book
      http://www.amazon.com/gp/product/1418499757/ref=cm_rdp_product

    2. Re:everything programmers should know about C++? by 192939495969798999 · · Score: 2, Funny

      Yeah, he is apparently very good at refactoring.

      --
      stuff |
    3. Re:everything programmers should know about C++? by GeckoX · · Score: 2, Funny

      Yeah, but that's 8 pages of pointers into said book ;)

      --
      No Comment.
  5. Favorite line... by wiredog · · Score: 3, Funny

    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.

  6. Everything you need to know about C++ by Anonymous Coward · · Score: 1, Funny

    Avoid it like the plague!

  7. Has he grown a beard? by Anonymous Coward · · Score: 1, Funny

    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.

  8. The name by Anonymous Coward · · Score: 2, Funny

    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.

  9. The Truth about C++ by Anonymous+Admin · · Score: 5, Funny

    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

  10. "What good progammers should think" by Anonymous Coward · · Score: 3, Funny

    and of course what all good code-writers should think about when using the language he created Let me guess. "How am I going to shoot myself in the foot today?"
  11. Re:Bjarne does.....what? by Anonymous Coward · · Score: 3, Funny

    Inaccurate. You forgot COBOL. But that's understandable, I want to forget it, too.

  12. Re:Normal Read by Anonymous Coward · · Score: 3, Funny

    Where is the printf() version?

  13. Sand-bagger by blueforce · · Score: 3, Funny

    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.
  14. Re:yawn by larry+bagina · · Score: 4, Funny

    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.

  15. Re:yawn by Rocky · · Score: 2, Funny

    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."
  16. Re:Use this link to read article on one page by erikvcl · · Score: 2, Funny

    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++.

  17. Re:Normal Read by Anonymous Coward · · Score: 1, Funny

    don't you mean (the) cout version;

  18. Re:yawn by Anonymous Coward · · Score: 1, Funny

    > 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.

  19. Re:Interesting Read by Mikkeles · · Score: 4, Funny

    Hey! I'm illiterate, you insensitive clod!

    As are most c++ programmers.

    --
    Great minds think alike; fools seldom differ.
  20. Re:Love C++, but it still sucks... by blueforce · · Score: 3, Funny

    ... +Inf, -Inf...

    Everything has its limits, you know.

    --
    If you do what you always did, you get what you always got.
  21. Re:Normal Read by Chris+Mattern · · Score: 3, Funny

    You mean the cout version, noob!

  22. C++ Debuggers by saccade.com · · Score: 3, Funny
    At a corporate event a few years ago, I found myself seated across from Mr. Stroustrup. I asked him what debugger he used for his own development.

    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...

  23. Re:useful but oh so flawed by neonsignal · · Score: 2, Funny

    the bloke was complaining about function nesting and you suggested Lisp?

  24. Re:Interesting Read by Anonymous+Brave+Guy · · Score: 2, Funny

    Oh know were not.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  25. Re:yawn by pigwin32 · · Score: 2, Funny

    Umm, QED?