22 July 2009

The Concepts feature removed from C++0x

Bjarne Stroustrup discusses the standards committee's decision to remove Concepts from C++0x in DDJ [ via Reddit ]. A description of the feature has already been removed from the C++0x Wikipedia entry, so you have to go back to a previous version of the article to read about it. Simply: concepts are a form of rule-based verification of the duck typing found in templates. Compile errors stemming from invalid template parameters are currently reported only after a template is expanded and it becomes clear that the resulting code disallows the type. Concepts would be syntactic rules attached to template that provide more explicit hints about parameters' requirements.

Also read Stroustroup's paper defending the use of concept maps [ via endnote #1 -> "The Removal of Concepts From C++0x" ]. A little heavy, but it pointed me to Stepanov and Paul McJone's new book (out 3 days ago!) Elements of Programming.

[ posted by sstrader on 22 July 2009 at 4:08:17 PM in Programming ]