FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
TABLE OF CONTENTS
July 22, 2009
The C++0x "Remove Concepts" Decision

(Page 1 of 3)
Bjarne Stroustrup
Concepts were to have been the central new feature in C++0x

Bjarne Stroustrup designed and implemented the C++ programming language. He can be contacted here.


At the July 2009 meeting in Frankfurt, Germany, the C++ Standards Committee voted to remove "concepts" from C++0x. Although this was a big disappointment for those of us who have worked on concepts for years and are aware of their potential, the removal fortunately will not directly affect most C++ programmers. C++0x will still be a significantly more expressive and effective language for real-world software development than C++98. The committee acted with the intent to limit risk and preserve schedule. Maybe a significantly improved version of "concepts" will be available in five years. This note explains the reasons for the removal of "concepts," briefly outlines the controversy and fears that caused the committee to decide the way it did, gives references for people who would like to explore "concepts," and points out that (despite enthusiastic rumors to the contrary) "the sky is not falling" on C++.

No "Concepts" in C++0x

At the July 2009 Frankfurt meeting of the ISO C++ Standards Committee (WG21), the "concepts" mechanism for specifying requirements for template arguments was "decoupled" (my less-diplomatic phrase was "yanked out"). That is, "concepts" will not be in C++0x or its standard library. That -- in my opinion -- is a major setback for C++, but not a disaster; and some alternatives were even worse.

I have worked on "concepts" for more than seven years and looked at the problems they aim to solve much longer than that. Many have worked on "concepts" for almost as long. For example, see (listed in chronological order):

It need not be emphasized that I and others are quite disappointed. The fact that some alternatives are worse is cold comfort and I can offer no quick and easy remedies.

Please note that the C++0x improvements to the C++ features that most programmers see and directly use are unaffected. C++0x will still be a more expressive language than C++98, with support for concurrent programming, a better standard library, and many improvements that make it significantly easier to write good (i.e., efficient and maintainable) code. In particular, every example I have ever given of C++0x code (e.g., in Evolving a language in and for the real world: C++ 1991-2006 at ACM HOPL-III ) that does not use the keywords "concept" or "requires" is unaffected. See also my C++0x FAQ. Some people even rejoice that C++0x will now be a simpler language than they had expected.

"Concepts" were to have been the central new feature in C++0x for putting the use of templates on a better theoretical basis, for firming-up the specification of the standard library, and a central part of the drive to make generic programming more accessible for mainstream use. For now, people will have to use "concepts" without direct language support as a design technique. My best scenario for the future is that we get something better than the current "concept" design into C++ in about five years. Getting that will take some serious focused work by several people (but not "design by committee").

1 No "Concepts" In C++0x | 2 What Happened? | 3 Technical Issues Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK