News

C++ Update in the Works

Major refresh coming for C++ programming language.

When Bjarne Stroustrup first developed the C++ programming language at Bell Labs in 1979, he set out to extend the value of the fast and capable C language by adding object-orientation and data abstraction capabilities to the familiar syntax of C. Now C++, originally named C with Classes, is due for its first major overhaul since being declared a standard by the International Organization for Standardization (ISO) in 1998.

The planned upgrade, for now called C++0x, could help broaden the appeal of C++ to developers looking to support multi-core processors and who are intrigued by the power and efficiency of dynamically typed languages like Python and Ruby. In an e-mail interview withRDN, Stroustrup, currently a professor and the College of Engineering chair in Computer Science at Texas A&M University, says the new version should appeal to a broad array of coders.

"Different people will evaluate changes differently. For some, a feature, say the regular expression matching library or the improved type checking for templates, will be seen as something truly major and novel," Stroustrup writes.

Jeffrey Hammond, analyst at Forrester Research Inc., says C++0x is a welcome upgrade. "If you look at the features in total, it's nice to see modern capabilities like smart pointers and optional garbage collection being proposed. They stand to make C++ more approachable for higher-level tasks while retaining the power required for close-to-the-metal programming," he says.

Generic Blues
Among the key new capabilities is support for concurrency, to enable apps to work efficiently with multi-core systems. Stroustrup says C++0x will "provide the language primitives and foundation libraries needed to support more advanced concurrency models." He also singles out new capabilities for generic programming, listing off added support for concepts, variable type deduction, variadic templates, and the new for loop.

"Generic programming is a big deal -- on the order of object-oriented programming -- and is hard to get accepted and properly used in the mainstream," Stroustrup explains. "I hope that it's understood that if these techniques get really mainstream, it's because they'll be easier to understand and use in C++0x, not because C++0x is more advanced (which it also is)."

Support for generics should appeal to shops intrigued by Ruby and other dynamic languages, notes Hammond. "Generics are one of the key reasons that dynamic languages are growing in popularity. They let experienced developers write tighter, more elegant code by trusting them to connect elements that make sense as part of their programming process." Herb Sutter, software architect at Microsoft and chair of the ISO C++ standards committee, says dev shops can expect Microsoft to support the new features in its Visual C++ IDE once work on the standard is complete.

"C++0x isn't yet complete and isn't expected to be for another two years," says Sutter, who notes the committee hopes to ratify the update in 2009. "Microsoft is participating directly in the standards effort and C++0x design and tracking it. When the standard is complete we plan to support new C++0x features soon afterward."

Actually, the C++0x spec could be all but complete as early as October 2007, pending a critical vote that then puts the spec out for public review, says Stroustrup. But the formal approval of a C++0x standard will likely be pushed out to the 2009 timeframe by what Stroustrup calls an "elaborate international ratification procedure."

Once approval happens, Hammond expects C++0x to gain broad industry support quickly. "If you look at what has happened as other languages like Java added new keywords and features over the last five years, the IDEs have pretty much supported the changes in stride."

So how should dev shops respond to this development?

Replies Hammond: "[My] advice is to wait for the standard to settle and watch for the updated compilers for the hardware platforms, then for updated support from Microsoft Visual Studio and from the Eclipse organization. Don't be in a hurry to move."

Stroustrup thinks dev shops can expect a smooth transition to the updated programming language.

"Once C++0x is the standard and the implementation suppliers ship it, most users will adopt it. It will not be one of those traumatic conversions that you see with proprietary languages."

About the Author

Michael Desmond is an editor and writer for 1105 Media's Enterprise Computing Group.

comments powered by Disqus

Featured

Subscribe on YouTube