Elf Qrin's Lair interviews Bjarne Stroustrup



Bjarne Stroustrup
Bjarne Stroustrup
Photo (c) Bjarne Stroustrup


Bjarne Stroustrup, born in Aarhus, Denmark, in 1950, is the designer and original implementer of C++, the most widely used language supporting object-oriented programming.

His book "The C++ Programming Language" (Addison-Wesley, first edition 1985, second edition 1991, third edition 1997, "special" edition 2000) is the most widely read book of its kind and has been translated into 14 languages. A later book, "The Design and Evolution of C++" (Addison-Wesley, 1994) broke new ground in the description of the way a programming language was shaped by ideas, ideals, problems, and practical constraints. In addition to his five books, Stroustrup has published more than sixty academic and more popular papers. He took an active role in the creation of the ANSI/ISO standard for C++.

Dr. Stroustrup is the head of AT&T Lab's Large-scale Programming Research department, an AT&T Bell Laboratories Fellow, and an AT&T Fellow.

Some questions for this interview were collected from other people whose names don't appear, but we'd like to thank them here.


October, 14 2000


Elf Qrin:
When and how did you start with computers?

Bjarne Stroustrup:
In 1970. I started a computer science course as part of my second year in university. Our departmental computer filled a small room and had less computer power and less than a tenth of the memory of my digital pocket camera. However programming was fun! It still is. In case you are curious: My first programming language was Algol60.

Caboom:
What made you to make a object wrapper around C, and what was the project that you were working on?

Bjarne Stroustrup:
I wouldn't describe what I did as an "object wrapper." Every language need to be able to express things like loops, conditions, arithmetic expressions, etc. By building on C, I was sure to have a complete set of basic facilities. By "complete" I don't mean in a formal or theoretical sense; that's easy. I mean in a practical sense.
By having C as a subset, I *knew* that my new language had sufficient facilities for serious systems building from day one.

Caboom:
Did you had any idea at the moment when you made a wrapper around C, that C++ would became, at some point, indipendent development platform?

Bjarne Stroustrup:
Actually, I hoped that it would become the next version of C.

Caboom:
What were object programming languages that you used as model for C++?

Bjarne Stroustrup:
The C++ class concept is closely modelled on that of Simula. Simula is the original object-oriented programming language. It introduced classes, class hierarchies, virtual functions, etc. It was developed by Dahl & Nygaard in Oslo (Norway) in the late 1960s.

Caboom:
Do you think that C++ owns great deal of it's popularity to C?

Bjarne Stroustrup:
Certainly. C++ was designed to be the next step up from C for good programmers. There is much I like about C. Otherwise, I'd have based C++ on some other language.

SpiderMan:
Did you ever dream that C++ would come this far, did you just know C++ was going to be big (gut feeling) or were you amazed when it finally did?

Bjarne Stroustrup:
I was amazed. I knew that the concepts of C++ were sound and that the techniques I used in its implementation made C++ a cheap, efficient, and practical tool in many environment. I was just trying to serve my users well; suddenly I noticed that I could no longer count those users and that I no longer had any idea what most C++ users were actually doing.

It is an important aspect of really good and general ideas that they are applicable far beyond the imagining of their originator. I was most concerned that I might limit the usefulness of C++ by imposing unnecessary restrictions. Attempts to limit expression to what a designer knows to be good is, IMO, a common problem with new languages.

For more information about C++, see my home pages: http://www.research.att.com/~bs

SpiderMan:
If you could talk to those people that called you crazy or said C++ would never happen, what would you say to them now?

Bjarne Stroustrup:
Few people called me crazy to my face. I'd just smile.

SpiderMan:
Where do you see C++ 20 years from now? Why?

Bjarne Stroustrup:
I can't imagine. Hope it will be as much better that current C++ as current C++ is better than the original K&R C from 20 years ago.

I wouldn't be surprised if it had millions of users and I wouldn't be surprised if it had only a few hundred thousands of programmers either.

SpiderMan:
Where do you see the future of technology headed?

Bjarne Stroustrup:
I'm a programmer and a scientist, not a prophet. Most of the scientists that ever lived are currently working. They'll find something. I hope that some of it will be so great that I couldn't possibly imagine what that is. Clearly, over the next decades we are going to see amazing applications of computers and of biology, but what they will be, I'd rather not guess about.

Elf Qrin:
What do you think of MicroSoft's "windowization" of languages and technologies meant to be portable, like C and Java?

Bjarne Stroustrup:
I strongly prefer non-proprietary languages. That's why I have spent so much time on the ISO standardization of C++. I also am very keen on portability. Consequently, I'm not keen on Microsoft's efforts to popularize proprietary, platform-specific languages such as Visual Basic and C#. Nor am I keen on Microsoft's attempts to make their proprietary platform central to programming. On the other hand, I don't think Sun is any more benign. Sun is pushing a proprietary language and platform (Java) over standardized languages such as C and C++. Naturally, both corporations work hard to make their proprietary offerings more attractive to people than non-proprietary alternatives.

SpiderMan:
Why is there no ANSI standard library for graphics?

Bjarne Stroustrup:
The ANSI and ISO committees do not have the resources to design such libraries, and the commercial vendors are still fighting for dominance rather than pulling together for a standards effort. An ANSI/ISO standard is based on concensus and there is not yet such a concensus on graphics and GUI issues.

SpiderMan:
What advice would you give to those people starting out in programming?

Bjarne Stroustrup:
Don't rush to create the fanciest game as your first program. Focus on concepts and techniques. Learn a language well before trying to tackle difficult applications. Remember that there is a distinction between a programming language and a graphical user interface. Don't confuse snazzy graphics (generated using someone else's libraries and tools) with good programming.

SpiderMan:
Do you think some people are born programmers and others aren't?

Bjarne Stroustrup:
To be a good programmer, you need to be reasonably bright (you don't need to be a genius), you need some practical knack (programming is also a craft), and you need some tenacity (debugging can be quite tedious). Some of that you are clearly born with, and much comes from your attitude and training which has less to do with the old nature vs. nuture debate.

SpiderMan:
In your opinion do you see coding as a form of free speech? (from the DeCSS case)

Bjarne Stroustrup:
I don't recognize the "DeCSS" acronym. I see programming as a creative activity much like writing prose or poetry, composing music, or designing hardware. Do you mean "free" as in "gratis" and "I can copy your work without paying?" My answer to that is that creative work must be encouraged and protected; otherwise, far less of it will be done. If the creator of a work want to give you a work for free, that's fine, but if he/she doesn't give that permission, copying the work is simple theft, be it a poem, a novel, a recorded song, or a program.

Note by Elf Qrin: I've sent a short explanation of the DeCSS case to Dr. Stroustrup, but he declined to comment: "we should just leave my answer as is. I'd prefer to give a short answer on more general principles than get into the mess of an active law suit." However, about the following passage: "DeCSS supporters defend themselves saying that besides of any ethical consideration, if your protection is too weak, is your fault." he said "I wonder if they'd accept the defense of a burglar after cleaning out their house: 'if your door and window locks are too weak, it's your fault.' I believe that is many countries the posession of burglar tools is still a crime."

SpiderMan:
Usually young children want to grow up to be doctors, fire fighters, superheors, etc.. what did you want to be when you were little?

Bjarne Stroustrup:
I don't really recall being stuck at any one specific dream for long. I had enough experience with manual labor to know that I didn't want to do that for a living. I remember reading thick books on architecture, dreaming about building things. I remember reading history and sociology, dreaming about making a contribution to our understanding of the world and to make it a better place. But these are high-school dreams, not little children's dreams.

Later, I even dreamed of becoming a mathematician (my masters degree is a math degree), but then I discovered programming and the joys of building systems.

Elf Qrin:
How do you feel knowing that for some guys you are just as great as a basket, baseball or soccer star?

Bjarne Stroustrup:
That's scary, especially when they email me out of the blue asking for advice. Advice about life and careers, I mean. Technical questions are easy. It seems that any kind of fame comes with a burden of resonsibility.

Caboom:
Did you ever receive this kind of mails: "mr. stroustrup if anyone can help, that's you: in line 2354 i think there is some error can you correct code for me."? If yes, how do you react?

Bjarne Stroustrup:
I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exibit the problem and send me that. Mostly, they then find the error themselves. "finding the smallest program that demonstrates the error" is a powerful debugging tool.

I try to be helpful, but I don't do (other people's) homework, and I often recommend people to read their C++ textbook more carefully before mailing me. Or to find local help. There is only one of me and *many* C++ programmers and students.