C/C++

An Interview with Bjarne Stroustrup

By James Buchanan, March 27, 2008

C++ creator Bjarne Stroustrup discusses the evolving C++0x standard, the education of programmers, and the future of programming.

C++0x

JB: In your paper, "The Design of C++0x" published in the May 2005 issue of the C/C++ User's Journal, you note that "C++'s emphasis on general features (notably classes) has been its main strength." In that paper you also mention the most change and new features will be in the Standard Library. A lot of people would like to see regular expressions, threads and the like, for example. Could you give us an idea of new classes or facilities that we can expect to see in C++0x's Standard Library?

BS: The progress on standard libraries has not been what I hoped for. We will get regular expressions, hash tables, threads, many improvements to the existing containers and algorithms, and a few more minor facilities. We will not get the networking library, the date and time library, or the file system library. These will wait until a second library TR. I had hoped for much more, but the committee has so few resources and absolutely no funding for library development.

JB: Have you or others working on C++0x had a lot of genuinely good ideas for new classes or facilities? If so, will all of them be used or will some have to be left out because of time and other constraints on developing a new standard? If that is the case, what would most likely be left out?

BS: There is no shortage of good ideas in the committee or of good libraries in the wider C++ community. There are, however, severe limits to what a group of volunteers working without funding can do. What I expect to miss most will be thread pools and the file system library. However, please note that the work will proceed beyond '09 and that many libraries are already available; for example see what boost.org has to offer.

JB: When would you expect the C++0x Standard to be published?

BS:The standard will be finished in late 2008, but it takes forever to go through all the hoops of the ISO process. So, we must face the reality that "C++0x" may become C++10.

JB: Concurrent programming is obviously going to become important in the future, because of multi-core processors and kernels that get better at distributing processes among them. Do you expect C++0x will address this, and if so, how?

BS: The new memory model and a task library was voted into C++0x in Kona. That provides a firm basis for share-memory multiprocessing as is essential for multicores. Unfortunately, it does not address higher-level models for concurrency such as thread pools and futures, shared memory parallel programming, or distributed memory parallel processing. Thread pools and futures are scheduled for something that's likely to be C++13. Shared memory can be had using Intel's Threading Building Blocks and distributed memory parallel processing is addresses by STAPL from Texas A&M University and other research systems. The important thing here is that given the well-defined and portable platform provided by the C++0x memory model and threads, many higher-level models can be provided.

Distributed programming isn't addressed, but there is a networking library scheduled for a technical report. That library is already in serious commercial use and its public domain implementation is available from boost.org.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Video

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!