Print

C11/C++11: Building blocks for the future



Larry O Brien
Email
August 27, 2012 —  (Page 2 of 4)

‘More than a billion lines of code’
Stroustrup and others worked within the bureaucratic process of ISO standardization. The C and C++ languages are standardized under the International Organization for Standardization (ISO), the gold standard of technical standards groups.

The C and C++ ISO standards groups have been working since the mid-1990s. ANSI, the American National Standards Institute and the United States representative to ISO, worked on a C-language standard all the way back to the early 1980s. C has had three standards: C89, C99 and C11. (One often hears of the 1989 and 1999 standards called “ANSI C,” which is an anachronism now that the language is under ISO.) C++ has also had three: C++98, C++03 and C++11, as well as a library-focused “Technical Report” release in 2005.

The overwhelming theme of the C/C++ standards is that they’re conservative. C, in particular, is universal: If there’s a chip, there’s a C compiler for it. Every aspect of the language that has to do with memory or implies something about hardware implementation is going to be carefully scrutinized by literally hundreds of companies worrying, “What about me?”

And there’s a lot of C and C++ code out there. Coverity, which makes a static analysis tool, in 2009 had approximately 700 customers “with somewhat more than a billion lines of code among them.” (The quote is from the article “A Few Billion Lines of Code Later,” which is an absolute must-read for anyone interested in understanding the C and C++ world.) While Coverity is a successful and well-regarded company, there’s no way its customer base represents more than a tiny fraction of the total amount of C and C++ code used and depended upon throughout the world. So every change, no matter how trivial and obviously “correct” (for instance, not requiring a space between the closing right brackets in template expressions) is going to break someone’s code, somewhere, and cause pain. The awareness of how troublesome changes can be is palpable during discussions at standards meetings. That anything is approved can seem to an onlooker to be the biggest triumph of such meetings.

Language directives
But big changes have come to the languages, albeit slowly. C11 boasts better Unicode support, more control of alignment, and, most importantly, an improved and standardized memory model that supports thread-local storage and uninterruptible object access (a.k.a. “atomic” access, the guarantee that an access will not be interleaved with access from some other thread). The Unicode support, where a “u8”, “u” or “U” prefix on a string literal specifies the encoding, will probably be the most visible giveaway in C11 code.

The changes in C++ are considerably more visible. In addition to the directive of “making C++ easier to teach and learn” mentioned earlier, the other major directive was to “make C++ a better language for systems programming and library building.” Together, these two directives pushed the language to adopt a lot of lessons from the mainstream managed languages while never sacrificing the emphasis on performance or ability for low-level control.


Related Search Term(s): C, C++

Pages 1 2 3 4 


Share this link: http://sdt.bz/36891
 

close
NEXT ARTICLE
News Briefs: November 15, 2008
Metaforic comes out with a new security product for monitoring networks, ICEsoft and ILOG announce that they are merging their technologies for later releases, and Urbancode adds pre-flight builds for testers to AnthillPro Read More...
 
 
 




News on Monday  more>>
Android Developer News  more>>
SharePoint Tech Report  more>>
Big Data TechReport  more>>

   
 
 

 


Download Current Issue
JUNE 2013 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
 
 
 

Events calendar tab
Velocity Conf.
6/18/2013 to 6/20/2013
Santa Clara, Calif.
O'Reilly Media
Structure
6/19/2013 to 6/20/2013
San Francisco
GigaOM
Mobile Commerce World
6/24/2013 to 6/26/2013
San Francisco
UBM TechWeb
USENIX Federated Conference
6/24/2013 to 6/28/2013
San Jose, Calif.
USENIX
Microsoft Build
6/26/2013 to 6/28/2013
San Francisco
Microsoft