Welcome!

Linux Containers Authors: Yeshim Deniz, Zakia Bouachraoui, Elizabeth White, Liz McMillan, Pat Romanski

Related Topics: Linux Containers

Linux Containers: Article

An interview with Bjarne Stroustrup

The future is multiparadigm programming

Bjarne Stroustrup is the creator of C++, one of the most widely used languages that allows object-oriented programming. He also authored The C++ Programming Language and The Design and Evolution of C++. Stroustrup is currently the head of AT&T Labs's large-scale programming research department in New Jersey. His research interests include distributed systems, operating systems, simulation, design, and programming.

LinuxWorld.com: Object-oriented languages have been around since the late 1960s. Yet, the object-oriented revolution took place more than two decades later. How do you explain this delay and which conclusions can we draw from it?

Bjarne Stroustrup: Part of the reason is that changes in people's behavior always take far more time than we are willing to believe. Another major reason is that some people had (and have) unreasonable expectations about "revolutions." The idea that there is one right way to solve essentially every problem for essentially every user is fundamentally wrong. I'm a great fan of the idea of object-oriented programming and the design ideals and techniques that it supports -- originating with Simula 67. However, those are not the only effective techniques. Much programming is best done with techniques that do not fall within a narrow definition of "object-oriented." And if you broaden the definition of "object-oriented" sufficiently for it not to be an obstacle to good programming and design, you get something that is basically meaningless. See my paper, "Why C++ isn't just an Object-Oriented Programming Language."

Yet, another reason is that people pushing "True OO" or "Pure OO" typically do so with languages and systems that impose enormous overheads for simple tasks compared to C and C++ code.

The conclusions that I drew (in 1980 or so) were that a general-purpose programming language must support multiple paradigms and that each paradigm must be supported well and with close-to-optimal runtime and space efficiencies. That said, I find that adoption of new ideas is seriously slowed by conservatism supported with myths of complexity and overheads.

Another problem is that many people, including many programmers, educators, and managers, are simply unwilling to face the complexities of software development. They dream of "silver bullets" and reject effective ideas because they are not perfect and not trivial to use by novices. This leads to real work being done using unnecessarily old languages, tools, and techniques while scarce resources are being squandered on a succession of fads. This underestimation of the problems also leads to every new "silver bullet" being too simplistic to address the rigors of real-world software development. And once something new has adapted to reality, it becomes vulnerable to criticism -- fair and not -- of complexity from the followers of the next "silver bullet."

To get back on a semitechnical note: I think that any language that aspires to mainstream use must provide a broad base for a variety of techniques -- including object-oriented programming (class hierarchies) and generic programming (parameterized types and algorithms). In particular, it must provide good facilities for composing programs out of separate parts (possibly writing in several different languages). I also think that exceptions are necessary for managing the complexity of error handling. A language that lacks such facilities forces its users to laboriously simulate them.

LinuxWorld.com: Which important programming trends are we about to see in the near future? What is the role of functional programming, rule-based programming, generic programming, and other programming paradigms in tomorrow's software world? Will any of these become the mainstream or are they mere academic trifles?

Bjarne Stroustrup: I'm not good at predicting the future, so I won't try, beyond pointing out that the future is usually more like yesterday than we like to believe. Note that COBOL, FORTRAN, and C still are major languages. Generic programming is real (mainstream) and you can see how the Standard Template Library (STL) borrows techniques from the functional programming community and uses them elegantly and efficiently in the context of C++. Rule-based programming (see the R++ link in Resources) has a record of failures and successes on a scale that didn't lead to mainstream adoption. That's a pity, but I don't want to call it an "academic trifle." Many of the ideas we today see as standalone languages will enter the mainstream as facilities and techniques embedded in a mainstream language, such as C++. The future will see much multiparadigm programming and many multilingual systems.

LinuxWorld.com: With the ratification of the new C99 standard, C/C++ compatibility seems more evasive than ever before. Is backward compatibility with C still one of the goals of C++? If so, what should be done to minimize the gaping chasms between the two languages?

Bjarne Stroustrup: C99 focused on extending the low-level facilities of C in the area of numeric programming. It basically ignored the abstraction facilities and the aims of generality embodied in C++. This makes compatibility harder as C adds more ad hoc, special-purpose facilities, where C++ addresses the same programmer needs through libraries implemented using general-purpose language facilities. An example is C99 variable-length arrays vs. C++'s vector. A more coordinated evolution of the two languages would have avoided this split.

My ideal is still a single language, and it is still technically feasible to merge C++ and C99 into a single, reasonably coherent language. I think such a language could meet every rational technical requirement. However, I'm not sure that the political will is there. For starters, it would require a merger of the C and C++ standards committees; it is not possible to have two different groups of people evolving two languages in parallel. Each committee attracts people who don't share the ideals of the majority of the other and who dislike compromising with that majority. Thus, whereas a single committee fosters a shared community, trust, and compromise, two committees provide opportunities for divergence and for ignoring inconvenient facts and opinions. Personally, I think the committees should work out an agreement to merge, and then merge in good time before the ISO C++ standard comes up for renewal. The result would be a better language and a much stronger community.

LinuxWorld.com: Are there any features or concepts in other fledging languages, say Python or Ada95, that you would like to see added to C++? Does C++ need any additional features or libraries at all?

Bjarne Stroustrup: I would like to see the upcoming revision of the C++ standard focus on libraries. The work on the language itself could be limited to correction of mistakes, to making the language more uniform, to provide minor extensions to support popular paradigms, and to provide guarantees needed for libraries. For example, I suspect that concurrency is best supported by a library and that such a library can be implemented without major language extensions. However, such a library might need some additional guarantees written into the standard. In addition, I'd like to see a merger of C and C++.

Consider "major" language facilities often discussed for C++:

  • Concurrency: I'd like to see a library supporting threads and a related library supporting concurrency without shared memory.
  • Reflection: I'd like to see something like that supported through a library defining the interface to extended type information.
  • Persistence: I'd like to see some support in the Standard Library, probably in connection with the extended type information, but I don't currently have any concrete suggestions.
  • Hash tables: Of course, some variant of the popular hash_map will be included.
  • Constraints for template arguments: This can be simply, generally, and elegantly expressed in C++ as is.
  • Assertions: Many of the most useful assertions [a means of code verification and error handling] can be expressed as templates. Some such should be added to the Standard Library.
  • Regular expression matching: I'd like to see a pattern-matching library in the standard.
  • Garbage collection: I'd like to see the C++ standard explicitly acknowledge that it is an acceptable implementation technique for C++, specifying that "concealed pointers" can be ignored and what happens to destructors for collected garbage. (See section C.4.1 of The C++ Programming Language for details.)
  • GUI: It would be nice to have a standard GUI framework, but I don't see how that could be politically feasible.
  • Platform-independent system facilities: I'd like to see the Standard Library provide a broader range of standard interfaces to common system resources (where available), such as directories and sockets.

Note that these extensions are primarily additions to the Standard Library and that they can be implemented without adding runtime or space overheads. Thus, they can be added without violating the "zero overhead" principle. Among other things, C++ is a good language for hard-core embedded systems programming and should remain so. Also, all facilities should be properly integrated with current Standard Library facilities such as strings and containers.

Except for the GUIs, I'm optimistic that it can all be done without undue controversy for the 2005 or so revision of the C++ standard. Of course, this is ambitious, but the alternative to ambitious goals is stagnation. I think the open source community has a major role to play in this, because none of these libraries are going to be accepted into the standard unless we have experience with quality implementations on which to base the standard.

LinuxWorld.com: It seems that C++ has failed in one important frontier: language advocacy. Many people still mistakenly believe that C++ is inherently slower than C, and the media, often failing to acknowledge that C++ is the most widely used general-purpose programming language, focuses on other overhyped languages instead. Where did we go wrong and what can be done to fix this?

Bjarne Stroustrup: C++ succeeded spectacularly in advocacy where it initially mattered most: getting millions of programmers to use it. Amazingly, this was achieved with no organization and essentially no resources. This may have made the C++ community complacent, definitely fragmented, and vulnerable to hostile propaganda. I suspect that the real problem is that good code is invisible -- even to its users. Consider C++ programs such as Netscape and Internet Explorer. Corporations that produce software for real-world tasks -- such as telecommunications management, engine control, and simulations -- don't advertise which languages they use. Unfortunately, that leaves the image-making to software tools vendors and academics.

C++ never had the backing of a major vendor. Every major vendor pushes -- and always pushed -- some proprietary language over C++. C++ never had marketing clout; where marketing was done, it was mostly done by organizations selling something else (such as a software development environment) that happened to include C++. Also, the C++ community suffers from the very success of C++: It is clearly "the one to beat" and in today's heavily commercialized world, a fair fight is a rarity.

The C++ community never had a well-defined center with financing allowing it to engage in popularizing information about C++. Who speaks for C++? And how would the message reach programmers, educators, and managers? Just this week, I heard of a professor insisting to his students that there isn't yet a C++ standard! Sadly, 2 years after the ratification, this is a common misconception.

So what can the C++ community do now? Make successes and successful techniques known. Articles and conference talks are possible venues, but for most busy programmers, a simple description on a Webpage is a more realistic option. Providing high-quality code to open source sites is probably the single most effective way of showing people what C++ can do (current examples are the SGI STL and Boost.org). Somehow, we have to create a widely known "portal" to C++-related information.

Commercial organizations could do a better job of publicizing the successes of their C++ users, especially if they restrain their tendency to focus on the proprietary aspects of their products. The multisupplier, standardized nature of C++ is a major reason for many of their users' choice of C++.

C++ must be taught better, with the Standard Library and the abstraction facilities given central roles. Teaching C++ as a set of advanced/complicated extensions to C is wasteful and confusing. (See "Learning Standard C++ as a New Language" in Resources.)

The standards committee must do its part by supplying standard versions of critical available, but nonstandard, libraries. It can be done, but no, it is not going to be easy.

More Stories By Danny Kalev

Danny Kalev, a system analyst and software engineer with 12 years of experience, specializes in C++, object-oriented analysis, and design on various platforms, including Linux.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
Whenever a new technology hits the high points of hype, everyone starts talking about it like it will solve all their business problems. Blockchain is one of those technologies. According to Gartner's latest report on the hype cycle of emerging technologies, blockchain has just passed the peak of their hype cycle curve. If you read the news articles about it, one would think it has taken over the technology world. No disruptive technology is without its challenges and potential impediments t...
If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of San...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...