News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

C++ revision will offer concurrency, ‘more natural’ operation

Aug 15, 2011 — by LinuxDevices Staff — from the LinuxDevices Archive — views

A new version of one of the world's most popular programming languages has been unanimously approved by the International Organization for Standardization (ISO). C++11 will be “more natural … and as efficient as ever,” and will include a new standardized memory model, according to creator Bjarne Stroustrup.

Bjarne Stroustrup started working on enhancements to C, initially called "C with Classes," back in 1979, and the resulting programming language was renamed C++ and published as an international standard in 1998. It has since become widely used in Microsoft's Windows 7, Apple's OS X, and Google's Chrome, to name just a few. It is somewhat less universally endorsed among Linux developers, but still plays a key role in tuxy programming, and was used to develop KDE.

Now, according to an August 12 blog posting by ISO C++ committee chief Herb Sutter, a significant revision has been approved unanimously. He writes, "The next revision of C++ that we've been calling 'C++0x' is now an International Standard! Geneva will take several months to publish it, but we hope it will be published well within the year, and then we'll be able to call it 'C++11.'"

C++ was created as a general purpose programming language that was both powerful and simpler to use than C, thanks to the inclusion of object orientation, Aug. 15 coverage by The Register points out. But, adds writer Gavin Clarke, C++ remains complex, and prompted Sun Microsystems' James Gosling to create Java, famously saying that Java was C++ "without the guns, knives, and clubs."

Stroustrup promises in his FAQ (last updated Aug. 13) that C++11 "feels like a new language: The pieces just fit together better than they used to and I find a higher-level style of programming more natural than before and as efficient as ever. If you timidly approach C++ as just a better C or as an object-oriented language, you are going to miss the point."

"Your ideas will map to enumerations, objects, classes (e.g. control of defaults), class hierarchies (e.g. inherited constructors), templates, aliases, exceptions, loops, threads, etc., rather than to a single 'one size fits all abstraction mechanism, " Stroustrup adds.

New features in C++11 are said to include support for concurrency and a standardized memory model, in addition to the following:

  • lambda expressions, which allow defining functions locally at the place of the call
  • automatic type deduction and decltype
  • uniform initialization syntax
  • deleted and defaulted functions
  • nullptr (a new keyword that designates a null pointer constant)

Availability

According to Stroustrup, the newly approved C++11 standard should be published later this year, but, he quips, "even a minor bureaucratic delay could make that C++12." No word was provided on how soon it will be supported by compiler vendors.

Meanwhile, a C++11 working paper is available in PDF format. A helpful article titled "The biggest changes in C++11 (and why you should care)" can be found on the Software Quality Connection website.

Jonathan Angel can be reached at [email protected] and followed at www.twitter.com/gadgetsense.


This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.