Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Interview With Bjarne Stroustrup 502

koval writes "artima.com has published an initial portion of interview with Bjarne Stroustrup. The scope of first part is mostly about improving the style of C++ programming and getting maximum from a language."
This discussion has been archived. No new comments can be posted.

Interview With Bjarne Stroustrup

Comments Filter:
  • by CyberGarp ( 242942 ) <Shawn AT Garbett DOT org> on Monday October 13, 2003 @11:33AM (#7199272) Homepage
    Any language that allows for someone making a living pointing out everything one shouldn't do needs more than a face-lift.
  • Yes! (Score:4, Funny)

    by kurosawdust ( 654754 ) on Monday October 13, 2003 @11:33AM (#7199273)
    Oh boy! I can't get enough of Bjarne and J-Lo!
  • by Brahmastra ( 685988 ) on Monday October 13, 2003 @11:37AM (#7199309)
    I agree with every word of this probably fake interview [safe-t.net]

    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 - really caught a cold trying to rewrite everything in C++ in about '90 or '91. I felt sorry for them really, but I thought people would learn from their mistakes.

    Interviewer: Obviously, they didn't?

    Stroustrup:

  • by gaijin99 ( 143693 ) on Monday October 13, 2003 @11:41AM (#7199344) Journal
    Any language that allows for someone making a living pointing out everything one shouldn't do needs more than a face-lift.

    Cute, but meaningless. Any language has features that are easily overused or abused. One of the things a programming teacher has to do with any beginning class is explain what you shouldn't do. Or at least he should be spending time on that.

    C++ has problems, yes; pretty unavoidable since it was the first real object oriented language. Java has a different set of problems since it was the first language that was OO from the ground up. I'd say its time to learn from the mistakes of both, scrap 'em, and build a language with the pitfalls of neither. 'Course that's a bundle of work, and you can get along well enough in either of them, so people tend to try and patch rather than start from scratch.

    The funny thing is that C still stands out as an excellent general purpose programming language. Possibly a bit akward for use in writing GUI's, but overall it still works after all these years. K&R deserve more praise than they've been getting.

  • by Dr. Photo ( 640363 ) on Monday October 13, 2003 @11:48AM (#7199411) Journal
    std::vector already does this. How about using it?

    Am I the first to think that maybe "STD vector" is possibly the worst name for a data type? ;)
  • by Waffle Iron ( 339739 ) on Monday October 13, 2003 @11:54AM (#7199457)
    C++ has problems, yes; pretty unavoidable since it was the first real object oriented language. Java has a different set of problems since it was the first language that was OO from the ground up.

    Let me guess... you work as a prior art researcher for the USPTO.

  • by PD ( 9577 ) * <slashdotlinux@pdrap.org> on Monday October 13, 2003 @11:55AM (#7199462) Homepage Journal
    Or assembly. You could have any object you wanted, as long as it fit in a register.
  • by Anonymous Coward on Monday October 13, 2003 @11:56AM (#7199471)
    C+++
  • by orthogonal ( 588627 ) on Monday October 13, 2003 @12:00PM (#7199504) Journal
    Am I the first to think that maybe "STD vector" is possibly the worst name for a data type? ;)

    try:
    using namespace condom ;
  • by BurKaZoiD ( 611246 ) on Monday October 13, 2003 @12:04PM (#7199524)
    Real men code in assembler

    Since when did Steve Gibson start posting here as an Anonymous Coward?

    Some people use a screwdriver, others use a butter knife. That's the beauty of programming; there are numerous tools and technologies at your disposal that will all achieve the effect (or at the very least, a semblance of the effect) you desire. Business users typically don't know the difference anyway, so it's really a matter of programmer's preference. Pick those you feel most appropriate to your project, and leave the rest.

    Most people I know don't get the beauty of something like C++. It's a massively complex language. So complex, as a matter of fact, that you can create OTHER languages with it (via templates). But, like any other, tool or technology, take what you want from C++, and leave the rest behind.
  • by happyfrogcow ( 708359 ) on Monday October 13, 2003 @12:46PM (#7199846)
    I've always liked C++. After reading about half (still working on the rest of it) of "The C++ Programming Language" by Bjarne, I've learned so much about what good C++ programming is about. During University, the C++ class I took covered so little. It was basically a C course except we implemented yet another string class. This book is great. Bjarne comes across as a really smart and logical person. The last few chapters about design are great. I skipped up to them after reading the first 2 sections or so. I love reading interviews of him and things he's written. Everytime I work on a personal project I try to add another idea he presents to my own work.

    I seriously enjoy programming in C++.

  • by Anonymous Coward on Monday October 13, 2003 @12:52PM (#7199886)
    Just put a wrapper around your object and you shouldn't have to worry about it.
  • by IWantMoreSpamPlease ( 571972 ) on Monday October 13, 2003 @01:07PM (#7200013) Homepage Journal
    I mis-read the title. Thought it said "interview with a mousetrap"

    oooops...
  • by rice_burners_suck ( 243660 ) on Monday October 13, 2003 @08:22PM (#7203694)
    improving the style of C++ programming

    What C++ really needs is more features... LOTS more features. The language is not "rich" enough. C++ should add many other features to its syntax.

    • For example, the ability to name identifiers with any character in any character set.
    • As C++ is not complicated enough, we need a way to dynamically create syntax. It would work like operator overloading, but much more complicated. And it would be called Syntax Overloading. For example, the code, ("for (" class "in" class ")")() { [insert code here] } would allow you to specify a new type of for loop with your own syntax. The compiler, upon reading this line, would add the new syntax to its language rules. Then, you could type for (className in otherClassName) { some.code.here(); } and it would work as expected.
    • The language desperately needs some built-in cryptography functions. For example, the function const unsigned void do_it(const unsigned short void const crypto % arg) takes one parameter, arg, which is encrypted inside a processor register and cannot enter main memory for security reasons.
    • More complicated template syntax is needed. For example, suppose you want to create a class that is unknown at compile time... obviously, a way to specify runtime template processing is desperately needed.
    • Support for returning multiple return values from a function. For example, the function const unsigned short, const int *, const long long grok_the_file(void) might return three different return values, seperated by commas, as in, return i, j, size; Oh yeah, and you could specify functions that return an unknown number of values using ellipses, as in unsigned short... function_name() or simply ... function_name(). Suppose you want to call a funciton that takes 3 parameters... you could instead pass it one function that returns 3 return values and C++ would know what to do with it.
    • C++ needs a reserved word, like please_reconsider_cast, or something, that uses common sense to figure out what the heck you're trying to typecast into what, so that even if the code is faulty, the compiler will figure out what you really mean.
    These are all just a drop in the bucket. C++ is obviously too small and simple of a language.

FORTRAN is not a flower but a weed -- it is hardy, occasionally blooms, and grows in every computer. -- A.J. Perlis

Working...