What will happen to C # and where does Stroustrup come from?

On January 1, 1998, Bjorn Stroustrup was interviewed by IEEE Computer magazine. Naturally, the editors expected him to look back at seven years of object-oriented design using the language Stroustrup had created.

By the end of the interview, they received even more than they bargained for, and subsequently decided to hide its content “for the good of the industry.” But, as happens in such cases, there was a leak.

Here is the full text of what was said during the interview. It was not edited or prepared in advance, so it is not as collapsible as scheduled interviews are.

– How does it feel to be the one who changed the world of software engineering? Several years have passed since then. What can you say looking back?

– Actually, before the interview, I thought about that time. Remember everyone wrote in C? The problem was, they did it damn well. And the universities taught this very well too. It is so good that they trained competent – I emphasize, “competent” – graduates with phenomenal speed. This led to the problem.

– To the problem?

– Yes, to the problem. Remember everyone wrote in COBOL?

– Of course. And me too.

“In the beginning, these guys were like demigods. They had high salaries and were treated like royalty.

– That was the time!

– Yes. But what happened? IBM got tired of this, and they began to invest millions in training programmers, until they became like dogs uncut.

– That’s why I left. The salary for the year fell so that it became more profitable to work as a journalist.

– Exactly. The same thing happened with the C programmers.

– Yes? So what?

– Once I came up with a small scheme that would restore the balance a little. I thought, “I wonder: what if there was a language so complex, so difficult to learn, that no one could ever flood the market with programmers?” In fact, I took some ideas from X10, i.e. X-Windows. It was such a bad graphics system it only worked on these Sun 3/60 things! It had all the ingredients I needed: ridiculously complex syntax, obscure functions, and a pseudo-object-oriented structure. Even now, nobody writes raw code on X-Windows. Why? This is the only way if you want to maintain mental health.

– Are you joking?

– Not at all. There was actually another problem. Unix was written in C, that is, any C programmer could very easily become a systems programmer. Remember how much a mainframe programmer was making?

– Of course! I worked for them.

“So this new language was supposed to split from Unix, hiding all the system calls that tied them together so well. This would allow those guys who only know DOS to make good money.

– I do not believe that you said that …

– Enough time has passed. I think most people have figured out on their own that C ++ is a waste of time. Only they came to this much later than I had hoped.

– And how exactly did you do it?

“It was supposed to be just a joke. I never thought people would take this book seriously. Anyone who still has a brain understands that object-oriented programming is not intuitive, illogical and inefficient.

– What?

– What about reusable code? Have you ever heard of a company reusing their code?

– I’ve never heard of it, but …

– You see. True, some tried at first. There was this Oregon company (Mentor Graphics, I think) that caught a bad cold trying to rewrite everything in C ++ in 1990 or 1991. True, I was very sorry for them, but I thought that they would learn from their mistakes.

– Obviously, mistakes have not taught them?

– Not at all. The problem is that most companies keep silent about all their major blunders, because it is not easy to explain to shareholders the loss of $ 30 million. However, let’s give them their due, in the end they succeeded.

– Happened? You see, this proves that object-oriented programming works.

– Almost. The executable was so huge that it took five minutes to load onto an HP workstation with 128MB of RAM. And then it ran very slowly. I thought it would be a big problem and they would come for me within a week, but nobody cared. Sun and HP were only too happy to sell incredibly powerful boxes with enormous resources that could only run the simplest programs. You know, when the first C ++ compiler appeared at AT&T, I compiled “Hello World” and could not believe that the size of the executable file was 2.1 MB.

– Yes? But since then, compilers have come a long way.

– Really? Try the latest version of g ++ – you won’t get much change from half a megabyte. In addition, there are several very recent examples from around the world. British Telecom had a major accident and luckily they managed to throw it all away and start over. They were more fortunate than Australian Telecom. Now I hear that Siemens is creating a dinosaur, and I am more and more alarmed, because the size of the hardware for executable files is growing. What can we say about multiple inheritance …

– Yes, but C ++ is basically a reliable language.

“Do you really believe that?” Have you ever worked on a C ++ project? Here’s what’s going on: First, I’ve laid enough pitfalls so that only the simplest projects work the first time. Take operator overloading. At the end of the project, it is in almost every module, because the guys think that it should be so, because it was so in their curriculum. The same operator means something completely different in every module. Try to put it all together when you have about a hundred modules. And hiding data … Oh my God, sometimes I can’t help laughing when I hear about the problems of companies making their modules talk to each other. I think the word “synergistic” was specially coined to add agony to the project manager.

“I must say, this is all very shocking. You say you did this to increase the salaries of programmers? It’s disgusting.

– Well, what are you? Everyone has a choice. I didn’t expect things to get out of hand like this. In any case, I, in principle, achieved my goal: C ++ is dying, but programmers receive high salaries. Especially those poor fellows who have to support all this nonsense. It is clear that it is impossible to maintain a large program module in C ++ if you did not write it?

– Like this?

– Don’t you know? Remember typedef?

– Oh sure.

– Do you remember how long it took to probe the header files, and then it turned out that RoofRaised is a double precision number? Imagine how long it takes to find all the implicitly defined types in all classes in a large project.

– And how did you realize that you have achieved your goal?

– Remember the length of a medium-sized C project? About six months. Not long enough to provide a decent standard of living for the wife and children. Take the same project and develop it in C ++. What do you get? I will tell you. One to two years. Isn’t it great? And this is a guaranteed job – just because of one mistake in judgment. And something else. Universities have not taught C for so long that now there are not enough decent C programmers. Especially those who know something about programming Unix systems. How many people know what to do with malloc when they’ve been using new all these years and never bothered to check the return code? In fact, most C ++ programmers throw away the return code. What happened to the good old –1? At least you knew you had an error by not getting bogged down in all those throw, catch and try.

“But inheritance can save you a lot of time.

– Really? Have you ever noticed the difference between a C and C ++ project plan? The scheduling phase of a C ++ project is three times longer precisely so that what should inherit is inherited and what should not not. And then, he is still misunderstood. Has anyone heard of memory leaks in a C program? Now their search is a whole industry. Most companies give up and ship the product outside (knowing it leaks like a sieve) just to avoid the cost of tracking the leaks.

– There are tools …

– Most of which are written in C ++.

“If we publish this, you might be lynched, do you understand that?

– I doubt. As I said, C ++ has long passed its peak, and no company, being of sound mind, will start a C ++ project without a pilot trial. It must convince them that this is the road to disaster. If not, then they deserve everything they get. You know, I tried to convince Dennis Ritchie to rewrite Unix in C ++.

– My God! What did he say?

– Fortunately, he has a good sense of humor. I think that both he and Brian understood then what I was doing, they just didn’t show it. He said he would help me write a C ++ version of DOS if I was interested.

– And what you?

Stroustrup: Actually I wrote DOS in C ++, I’ll give you a demo at the end of the interview. I run it on Sparc 20 in the computer room. On four cores, it works like a rocket and takes only 70 MB of disk space.

– What about the computer?

– And now you are joking. Have you never seen Windows 95? I consider this to be my greatest success: it had the effect of an exploding bomb before I was ready for it.

– You know, this idea with Unix ++ got me thinking. Someone will try to do it.

Stroustrup: Yes, but not after reading this interview.

– Sorry, but I don’t think we will publish any of this.

– But this is the history of the century. I just want my fellow programmers to remember me for what I did for them. Do you know how much you can get in C ++ now?

– As far as I know, the best get paid 70-80 dollars per hour.

– See? And he fully deserves it. It’s not an easy job to keep track of all the pitfalls that I put in C ++. And, as I said, every C ++ programmer feels bound by some mystical promise to use every element of the language in every project. In fact, it sometimes annoys me a lot. After so many years, I almost like this language.

– So you didn’t like him before?

“I hated him. He even looks awkward, doesn’t he? But when royalties from the book began to come in … Well, you understand.

– Wait a minute. What about links? You have to admit that you have improved the “C” signs.

– Hmm … I’ve always wondered this question. At first I thought I had improved. But I once discussed this with someone who wrote C ++ from the beginning. He said he doesn’t remember if his variables were referenced or dereferenced, so he always uses pointers. He said that the little star always reminded him of …

– At this point, I usually say “thank you very much”, but now it is hardly appropriate.

– Promise you will post it. Conscience haunts me.

– I’ll let you know. But I think I know what my editor has to say.

“Who’s going to believe it?” Although … send me a copy of this recording.

– It’s possible.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *